[2025-02-26 00:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:00:07
    [end_date_ymd] => 2025-02-26 00:00:07
    [RateCDR] => 1
)
  
[2025-02-26 00:00:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:00:07' and `end` < '2025-02-26 00:00:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:00:19] Production.INFO: count ==566  
[2025-02-26 00:00:19] Production.ERROR: pbx CDR StartTime 2025-02-25 21:00:07 - End Time 2025-02-26 00:00:07  
[2025-02-26 00:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557956', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557956', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:00:19] Production.INFO: ProcessCDR(1,14557956,1,1,2)  
[2025-02-26 00:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:00:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:00:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:00:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:00:28] Production.INFO: ==3548== Releasing lock...  
[2025-02-26 00:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:00:28] Production.INFO: 33.75 MB  #Memory Used#   
[2025-02-26 00:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:01:05
    [end_date_ymd] => 2025-02-26 00:01:05
    [RateCDR] => 1
)
  
[2025-02-26 00:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:01:05' and `end` < '2025-02-26 00:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:01:17] Production.INFO: count ==551  
[2025-02-26 00:01:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:01:05 - End Time 2025-02-26 00:01:05  
[2025-02-26 00:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557961', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557961', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:01:17] Production.INFO: ProcessCDR(1,14557961,1,1,2)  
[2025-02-26 00:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:01:20] Production.INFO: ==3641== Releasing lock...  
[2025-02-26 00:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:01:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 00:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:02:05
    [end_date_ymd] => 2025-02-26 00:02:05
    [RateCDR] => 1
)
  
[2025-02-26 00:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:02:05' and `end` < '2025-02-26 00:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:02:17] Production.INFO: count ==217  
[2025-02-26 00:02:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:02:05 - End Time 2025-02-26 00:02:05  
[2025-02-26 00:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557966', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557966', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:02:17] Production.INFO: ProcessCDR(1,14557966,1,1,2)  
[2025-02-26 00:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:02:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:02:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:02:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:02:20] Production.INFO: ==3713== Releasing lock...  
[2025-02-26 00:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:02:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:03:05
    [end_date_ymd] => 2025-02-26 00:03:05
    [RateCDR] => 1
)
  
[2025-02-26 00:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:03:05' and `end` < '2025-02-26 00:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:03:18] Production.INFO: count ==217  
[2025-02-26 00:03:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:03:05 - End Time 2025-02-26 00:03:05  
[2025-02-26 00:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557971', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557971', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:03:18] Production.INFO: ProcessCDR(1,14557971,1,1,2)  
[2025-02-26 00:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:03:21] Production.INFO: ==3794== Releasing lock...  
[2025-02-26 00:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:03:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:04:05
    [end_date_ymd] => 2025-02-26 00:04:05
    [RateCDR] => 1
)
  
[2025-02-26 00:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:04:05' and `end` < '2025-02-26 00:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:04:17] Production.INFO: count ==218  
[2025-02-26 00:04:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:04:05 - End Time 2025-02-26 00:04:05  
[2025-02-26 00:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557976', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557976', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:04:17] Production.INFO: ProcessCDR(1,14557976,1,1,2)  
[2025-02-26 00:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:04:22] Production.INFO: ==3865== Releasing lock...  
[2025-02-26 00:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:04:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 00:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:05:06
    [end_date_ymd] => 2025-02-26 00:05:06
    [RateCDR] => 1
)
  
[2025-02-26 00:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:05:06' and `end` < '2025-02-26 00:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:05:19] Production.INFO: count ==218  
[2025-02-26 00:05:19] Production.ERROR: pbx CDR StartTime 2025-02-25 21:05:06 - End Time 2025-02-26 00:05:06  
[2025-02-26 00:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557981', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557981', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:05:19] Production.INFO: ProcessCDR(1,14557981,1,1,2)  
[2025-02-26 00:05:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:05:22] Production.INFO: ==3937== Releasing lock...  
[2025-02-26 00:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:05:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 00:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:06:05
    [end_date_ymd] => 2025-02-26 00:06:05
    [RateCDR] => 1
)
  
[2025-02-26 00:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:06:05' and `end` < '2025-02-26 00:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:06:17] Production.INFO: count ==219  
[2025-02-26 00:06:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:06:05 - End Time 2025-02-26 00:06:05  
[2025-02-26 00:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557986', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557986', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:06:17] Production.INFO: ProcessCDR(1,14557986,1,1,2)  
[2025-02-26 00:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:06:21] Production.INFO: ==4007== Releasing lock...  
[2025-02-26 00:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:06:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:07:05
    [end_date_ymd] => 2025-02-26 00:07:05
    [RateCDR] => 1
)
  
[2025-02-26 00:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:07:05' and `end` < '2025-02-26 00:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:07:17] Production.INFO: count ==219  
[2025-02-26 00:07:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:07:05 - End Time 2025-02-26 00:07:05  
[2025-02-26 00:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557991', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557991', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:07:17] Production.INFO: ProcessCDR(1,14557991,1,1,2)  
[2025-02-26 00:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:07:20] Production.INFO: ==4080== Releasing lock...  
[2025-02-26 00:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:07:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:08:05
    [end_date_ymd] => 2025-02-26 00:08:05
    [RateCDR] => 1
)
  
[2025-02-26 00:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:08:05' and `end` < '2025-02-26 00:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:08:17] Production.INFO: count ==222  
[2025-02-26 00:08:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:08:05 - End Time 2025-02-26 00:08:05  
[2025-02-26 00:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14557996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557996', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14557996', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:08:17] Production.INFO: ProcessCDR(1,14557996,1,1,2)  
[2025-02-26 00:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14557996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14557996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14557996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14557996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14557996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:08:21] Production.INFO: ==4154== Releasing lock...  
[2025-02-26 00:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:08:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 00:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:09:05
    [end_date_ymd] => 2025-02-26 00:09:05
    [RateCDR] => 1
)
  
[2025-02-26 00:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:09:05' and `end` < '2025-02-26 00:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:09:17] Production.INFO: count ==222  
[2025-02-26 00:09:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:09:05 - End Time 2025-02-26 00:09:05  
[2025-02-26 00:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558001', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558001', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:09:17] Production.INFO: ProcessCDR(1,14558001,1,1,2)  
[2025-02-26 00:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:09:21] Production.INFO: ==4227== Releasing lock...  
[2025-02-26 00:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:09:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 00:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:10:06
    [end_date_ymd] => 2025-02-26 00:10:06
    [RateCDR] => 1
)
  
[2025-02-26 00:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:10:06' and `end` < '2025-02-26 00:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:10:18] Production.INFO: count ==230  
[2025-02-26 00:10:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:10:06 - End Time 2025-02-26 00:10:06  
[2025-02-26 00:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558006', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558006', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558006', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558006', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:10:18] Production.INFO: ProcessCDR(1,14558006,1,1,2)  
[2025-02-26 00:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558006', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558006', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:10:21] Production.INFO: ==4306== Releasing lock...  
[2025-02-26 00:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:10:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 00:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:11:05
    [end_date_ymd] => 2025-02-26 00:11:05
    [RateCDR] => 1
)
  
[2025-02-26 00:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:11:05' and `end` < '2025-02-26 00:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:11:17] Production.INFO: count ==253  
[2025-02-26 00:11:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:11:05 - End Time 2025-02-26 00:11:05  
[2025-02-26 00:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558012', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558012', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:11:17] Production.INFO: ProcessCDR(1,14558012,1,1,2)  
[2025-02-26 00:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:11:21] Production.INFO: ==4389== Releasing lock...  
[2025-02-26 00:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:11:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:12:05
    [end_date_ymd] => 2025-02-26 00:12:05
    [RateCDR] => 1
)
  
[2025-02-26 00:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:12:05' and `end` < '2025-02-26 00:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:12:18] Production.INFO: count ==254  
[2025-02-26 00:12:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:12:05 - End Time 2025-02-26 00:12:05  
[2025-02-26 00:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558017', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558017', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:12:18] Production.INFO: ProcessCDR(1,14558017,1,1,2)  
[2025-02-26 00:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:12:21] Production.INFO: ==4465== Releasing lock...  
[2025-02-26 00:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:12:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:13:05
    [end_date_ymd] => 2025-02-26 00:13:05
    [RateCDR] => 1
)
  
[2025-02-26 00:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:13:05' and `end` < '2025-02-26 00:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:13:17] Production.INFO: count ==254  
[2025-02-26 00:13:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:13:05 - End Time 2025-02-26 00:13:05  
[2025-02-26 00:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558022', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558022', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:13:18] Production.INFO: ProcessCDR(1,14558022,1,1,2)  
[2025-02-26 00:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:13:21] Production.INFO: ==4589== Releasing lock...  
[2025-02-26 00:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:13:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:14:06
    [end_date_ymd] => 2025-02-26 00:14:06
    [RateCDR] => 1
)
  
[2025-02-26 00:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:14:06' and `end` < '2025-02-26 00:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:14:18] Production.INFO: count ==262  
[2025-02-26 00:14:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:14:06 - End Time 2025-02-26 00:14:06  
[2025-02-26 00:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558027', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558027', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:14:18] Production.INFO: ProcessCDR(1,14558027,1,1,2)  
[2025-02-26 00:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:14:22] Production.INFO: ==4668== Releasing lock...  
[2025-02-26 00:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:14:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:15:05
    [end_date_ymd] => 2025-02-26 00:15:05
    [RateCDR] => 1
)
  
[2025-02-26 00:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:15:05' and `end` < '2025-02-26 00:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:15:17] Production.INFO: count ==262  
[2025-02-26 00:15:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:15:05 - End Time 2025-02-26 00:15:05  
[2025-02-26 00:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558032', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558032', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:15:17] Production.INFO: ProcessCDR(1,14558032,1,1,2)  
[2025-02-26 00:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:15:20] Production.INFO: ==4751== Releasing lock...  
[2025-02-26 00:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:15:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:16:05
    [end_date_ymd] => 2025-02-26 00:16:05
    [RateCDR] => 1
)
  
[2025-02-26 00:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:16:05' and `end` < '2025-02-26 00:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:16:17] Production.INFO: count ==262  
[2025-02-26 00:16:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:16:05 - End Time 2025-02-26 00:16:05  
[2025-02-26 00:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558037', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558037', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:16:17] Production.INFO: ProcessCDR(1,14558037,1,1,2)  
[2025-02-26 00:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:16:20] Production.INFO: ==4834== Releasing lock...  
[2025-02-26 00:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:16:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:17:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:17:04
    [end_date_ymd] => 2025-02-26 00:17:04
    [RateCDR] => 1
)
  
[2025-02-26 00:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:17:04' and `end` < '2025-02-26 00:17:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:17:16] Production.INFO: count ==268  
[2025-02-26 00:17:16] Production.ERROR: pbx CDR StartTime 2025-02-25 21:17:04 - End Time 2025-02-26 00:17:04  
[2025-02-26 00:17:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558042', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558042', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:17:17] Production.INFO: ProcessCDR(1,14558042,1,1,2)  
[2025-02-26 00:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:17:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:17:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:17:20] Production.INFO: ==4913== Releasing lock...  
[2025-02-26 00:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:17:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:18:05
    [end_date_ymd] => 2025-02-26 00:18:05
    [RateCDR] => 1
)
  
[2025-02-26 00:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:18:05' and `end` < '2025-02-26 00:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:18:17] Production.INFO: count ==271  
[2025-02-26 00:18:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:18:05 - End Time 2025-02-26 00:18:05  
[2025-02-26 00:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558047', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558047', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:18:17] Production.INFO: ProcessCDR(1,14558047,1,1,2)  
[2025-02-26 00:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:18:21] Production.INFO: ==5017== Releasing lock...  
[2025-02-26 00:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:18:21] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:19:05
    [end_date_ymd] => 2025-02-26 00:19:05
    [RateCDR] => 1
)
  
[2025-02-26 00:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:19:05' and `end` < '2025-02-26 00:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:19:17] Production.INFO: count ==278  
[2025-02-26 00:19:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:19:05 - End Time 2025-02-26 00:19:05  
[2025-02-26 00:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558052', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558052', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:19:17] Production.INFO: ProcessCDR(1,14558052,1,1,2)  
[2025-02-26 00:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:19:21] Production.INFO: ==5113== Releasing lock...  
[2025-02-26 00:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:19:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 00:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:20:06
    [end_date_ymd] => 2025-02-26 00:20:06
    [RateCDR] => 1
)
  
[2025-02-26 00:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:20:06' and `end` < '2025-02-26 00:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:20:18] Production.INFO: count ==280  
[2025-02-26 00:20:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:20:06 - End Time 2025-02-26 00:20:06  
[2025-02-26 00:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558058', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558058', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:20:18] Production.INFO: ProcessCDR(1,14558058,1,1,2)  
[2025-02-26 00:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:20:22] Production.INFO: ==5228== Releasing lock...  
[2025-02-26 00:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:20:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 00:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:21:05
    [end_date_ymd] => 2025-02-26 00:21:05
    [RateCDR] => 1
)
  
[2025-02-26 00:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:21:05' and `end` < '2025-02-26 00:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:21:17] Production.INFO: count ==288  
[2025-02-26 00:21:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:21:05 - End Time 2025-02-26 00:21:05  
[2025-02-26 00:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558063', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558063', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:21:17] Production.INFO: ProcessCDR(1,14558063,1,1,2)  
[2025-02-26 00:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:21:21] Production.INFO: ==5331== Releasing lock...  
[2025-02-26 00:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:21:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:22:05
    [end_date_ymd] => 2025-02-26 00:22:05
    [RateCDR] => 1
)
  
[2025-02-26 00:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:22:05' and `end` < '2025-02-26 00:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:22:17] Production.INFO: count ==276  
[2025-02-26 00:22:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:22:05 - End Time 2025-02-26 00:22:05  
[2025-02-26 00:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558068', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558068', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:22:17] Production.INFO: ProcessCDR(1,14558068,1,1,2)  
[2025-02-26 00:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:22:21] Production.INFO: ==5435== Releasing lock...  
[2025-02-26 00:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:22:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:23:05
    [end_date_ymd] => 2025-02-26 00:23:05
    [RateCDR] => 1
)
  
[2025-02-26 00:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:23:05' and `end` < '2025-02-26 00:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:23:17] Production.INFO: count ==276  
[2025-02-26 00:23:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:23:05 - End Time 2025-02-26 00:23:05  
[2025-02-26 00:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558073', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558073', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:23:17] Production.INFO: ProcessCDR(1,14558073,1,1,2)  
[2025-02-26 00:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:23:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:23:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:23:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:23:20] Production.INFO: ==5527== Releasing lock...  
[2025-02-26 00:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:23:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:24:06
    [end_date_ymd] => 2025-02-26 00:24:06
    [RateCDR] => 1
)
  
[2025-02-26 00:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:24:06' and `end` < '2025-02-26 00:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:24:18] Production.INFO: count ==273  
[2025-02-26 00:24:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:24:06 - End Time 2025-02-26 00:24:06  
[2025-02-26 00:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558078', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558078', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:24:18] Production.INFO: ProcessCDR(1,14558078,1,1,2)  
[2025-02-26 00:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:24:21] Production.INFO: ==5617== Releasing lock...  
[2025-02-26 00:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:24:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:25:05
    [end_date_ymd] => 2025-02-26 00:25:05
    [RateCDR] => 1
)
  
[2025-02-26 00:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:25:05' and `end` < '2025-02-26 00:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:25:17] Production.INFO: count ==272  
[2025-02-26 00:25:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:25:05 - End Time 2025-02-26 00:25:05  
[2025-02-26 00:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558083', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558083', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:25:17] Production.INFO: ProcessCDR(1,14558083,1,1,2)  
[2025-02-26 00:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:25:20] Production.INFO: ==5714== Releasing lock...  
[2025-02-26 00:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:25:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:26:05
    [end_date_ymd] => 2025-02-26 00:26:05
    [RateCDR] => 1
)
  
[2025-02-26 00:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:26:05' and `end` < '2025-02-26 00:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:26:17] Production.INFO: count ==276  
[2025-02-26 00:26:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:26:05 - End Time 2025-02-26 00:26:05  
[2025-02-26 00:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558088', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558088', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:26:17] Production.INFO: ProcessCDR(1,14558088,1,1,2)  
[2025-02-26 00:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:26:21] Production.INFO: ==5814== Releasing lock...  
[2025-02-26 00:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:26:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 00:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:27:05
    [end_date_ymd] => 2025-02-26 00:27:05
    [RateCDR] => 1
)
  
[2025-02-26 00:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:27:05' and `end` < '2025-02-26 00:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:27:17] Production.INFO: count ==271  
[2025-02-26 00:27:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:27:05 - End Time 2025-02-26 00:27:05  
[2025-02-26 00:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558093', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558093', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:27:17] Production.INFO: ProcessCDR(1,14558093,1,1,2)  
[2025-02-26 00:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:27:20] Production.INFO: ==5904== Releasing lock...  
[2025-02-26 00:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:27:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:28:05
    [end_date_ymd] => 2025-02-26 00:28:05
    [RateCDR] => 1
)
  
[2025-02-26 00:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:28:05' and `end` < '2025-02-26 00:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:28:17] Production.INFO: count ==272  
[2025-02-26 00:28:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:28:05 - End Time 2025-02-26 00:28:05  
[2025-02-26 00:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558098', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558098', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:28:17] Production.INFO: ProcessCDR(1,14558098,1,1,2)  
[2025-02-26 00:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:28:21] Production.INFO: ==5998== Releasing lock...  
[2025-02-26 00:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:28:21] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:29:05
    [end_date_ymd] => 2025-02-26 00:29:05
    [RateCDR] => 1
)
  
[2025-02-26 00:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:29:05' and `end` < '2025-02-26 00:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:29:17] Production.INFO: count ==271  
[2025-02-26 00:29:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:29:05 - End Time 2025-02-26 00:29:05  
[2025-02-26 00:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558103', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558103', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:29:17] Production.INFO: ProcessCDR(1,14558103,1,1,2)  
[2025-02-26 00:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:29:21] Production.INFO: ==6133== Releasing lock...  
[2025-02-26 00:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:29:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:30:06
    [end_date_ymd] => 2025-02-26 00:30:06
    [RateCDR] => 1
)
  
[2025-02-26 00:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:30:06' and `end` < '2025-02-26 00:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:30:18] Production.INFO: count ==278  
[2025-02-26 00:30:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:30:06 - End Time 2025-02-26 00:30:06  
[2025-02-26 00:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558109', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558109', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:30:18] Production.INFO: ProcessCDR(1,14558109,1,1,2)  
[2025-02-26 00:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:30:21] Production.INFO: ==6231== Releasing lock...  
[2025-02-26 00:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:30:21] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:31:05
    [end_date_ymd] => 2025-02-26 00:31:05
    [RateCDR] => 1
)
  
[2025-02-26 00:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:31:05' and `end` < '2025-02-26 00:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:31:16] Production.INFO: count ==301  
[2025-02-26 00:31:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:31:05 - End Time 2025-02-26 00:31:05  
[2025-02-26 00:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558114', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558114', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:31:17] Production.INFO: ProcessCDR(1,14558114,1,1,2)  
[2025-02-26 00:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:31:20] Production.INFO: ==6328== Releasing lock...  
[2025-02-26 00:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:31:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:32:05
    [end_date_ymd] => 2025-02-26 00:32:05
    [RateCDR] => 1
)
  
[2025-02-26 00:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:32:05' and `end` < '2025-02-26 00:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:32:17] Production.INFO: count ==303  
[2025-02-26 00:32:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:32:05 - End Time 2025-02-26 00:32:05  
[2025-02-26 00:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558119', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558119', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:32:17] Production.INFO: ProcessCDR(1,14558119,1,1,2)  
[2025-02-26 00:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:32:21] Production.INFO: ==6421== Releasing lock...  
[2025-02-26 00:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:32:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:33:05
    [end_date_ymd] => 2025-02-26 00:33:05
    [RateCDR] => 1
)
  
[2025-02-26 00:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:33:05' and `end` < '2025-02-26 00:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:33:17] Production.INFO: count ==303  
[2025-02-26 00:33:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:33:05 - End Time 2025-02-26 00:33:05  
[2025-02-26 00:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558124', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558124', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:33:17] Production.INFO: ProcessCDR(1,14558124,1,1,2)  
[2025-02-26 00:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:33:20] Production.INFO: ==6515== Releasing lock...  
[2025-02-26 00:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:33:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:34:06
    [end_date_ymd] => 2025-02-26 00:34:06
    [RateCDR] => 1
)
  
[2025-02-26 00:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:34:06' and `end` < '2025-02-26 00:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:34:17] Production.INFO: count ==303  
[2025-02-26 00:34:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:34:06 - End Time 2025-02-26 00:34:06  
[2025-02-26 00:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558129', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558129', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:34:18] Production.INFO: ProcessCDR(1,14558129,1,1,2)  
[2025-02-26 00:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:34:21] Production.INFO: ==6613== Releasing lock...  
[2025-02-26 00:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:34:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:35:05
    [end_date_ymd] => 2025-02-26 00:35:05
    [RateCDR] => 1
)
  
[2025-02-26 00:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:35:05' and `end` < '2025-02-26 00:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:35:17] Production.INFO: count ==303  
[2025-02-26 00:35:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:35:05 - End Time 2025-02-26 00:35:05  
[2025-02-26 00:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558134', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558134', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:35:17] Production.INFO: ProcessCDR(1,14558134,1,1,2)  
[2025-02-26 00:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:35:20] Production.INFO: ==6705== Releasing lock...  
[2025-02-26 00:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:35:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:36:05
    [end_date_ymd] => 2025-02-26 00:36:05
    [RateCDR] => 1
)
  
[2025-02-26 00:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:36:05' and `end` < '2025-02-26 00:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:36:17] Production.INFO: count ==303  
[2025-02-26 00:36:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:36:05 - End Time 2025-02-26 00:36:05  
[2025-02-26 00:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558139', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558139', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:36:17] Production.INFO: ProcessCDR(1,14558139,1,1,2)  
[2025-02-26 00:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:36:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:36:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:36:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:36:20] Production.INFO: ==6802== Releasing lock...  
[2025-02-26 00:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:36:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:37:06
    [end_date_ymd] => 2025-02-26 00:37:06
    [RateCDR] => 1
)
  
[2025-02-26 00:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:37:06' and `end` < '2025-02-26 00:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:37:18] Production.INFO: count ==303  
[2025-02-26 00:37:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:37:06 - End Time 2025-02-26 00:37:06  
[2025-02-26 00:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558144', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558144', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:37:18] Production.INFO: ProcessCDR(1,14558144,1,1,2)  
[2025-02-26 00:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:37:21] Production.INFO: ==6902== Releasing lock...  
[2025-02-26 00:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:37:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:38:05
    [end_date_ymd] => 2025-02-26 00:38:05
    [RateCDR] => 1
)
  
[2025-02-26 00:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:38:05' and `end` < '2025-02-26 00:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:38:17] Production.INFO: count ==296  
[2025-02-26 00:38:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:38:05 - End Time 2025-02-26 00:38:05  
[2025-02-26 00:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558149', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558149', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:38:17] Production.INFO: ProcessCDR(1,14558149,1,1,2)  
[2025-02-26 00:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:38:20] Production.INFO: ==7005== Releasing lock...  
[2025-02-26 00:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:38:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:39:06
    [end_date_ymd] => 2025-02-26 00:39:06
    [RateCDR] => 1
)
  
[2025-02-26 00:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:39:06' and `end` < '2025-02-26 00:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:39:18] Production.INFO: count ==295  
[2025-02-26 00:39:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:39:06 - End Time 2025-02-26 00:39:06  
[2025-02-26 00:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558154', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558154', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:39:18] Production.INFO: ProcessCDR(1,14558154,1,1,2)  
[2025-02-26 00:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:39:21] Production.INFO: ==7108== Releasing lock...  
[2025-02-26 00:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:39:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:40:06
    [end_date_ymd] => 2025-02-26 00:40:06
    [RateCDR] => 1
)
  
[2025-02-26 00:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:40:06' and `end` < '2025-02-26 00:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:40:18] Production.INFO: count ==303  
[2025-02-26 00:40:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:40:06 - End Time 2025-02-26 00:40:06  
[2025-02-26 00:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558160', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558160', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:40:18] Production.INFO: ProcessCDR(1,14558160,1,1,2)  
[2025-02-26 00:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:40:21] Production.INFO: ==7201== Releasing lock...  
[2025-02-26 00:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:40:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:41:06
    [end_date_ymd] => 2025-02-26 00:41:06
    [RateCDR] => 1
)
  
[2025-02-26 00:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:41:06' and `end` < '2025-02-26 00:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:41:17] Production.INFO: count ==311  
[2025-02-26 00:41:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:41:06 - End Time 2025-02-26 00:41:06  
[2025-02-26 00:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558165', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558165', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:41:18] Production.INFO: ProcessCDR(1,14558165,1,1,2)  
[2025-02-26 00:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:41:21] Production.INFO: ==7294== Releasing lock...  
[2025-02-26 00:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:41:21] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:42:05
    [end_date_ymd] => 2025-02-26 00:42:05
    [RateCDR] => 1
)
  
[2025-02-26 00:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:42:05' and `end` < '2025-02-26 00:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:42:17] Production.INFO: count ==307  
[2025-02-26 00:42:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:42:05 - End Time 2025-02-26 00:42:05  
[2025-02-26 00:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558170', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558170', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:42:17] Production.INFO: ProcessCDR(1,14558170,1,1,2)  
[2025-02-26 00:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:42:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:42:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:42:20] Production.INFO: ==7394== Releasing lock...  
[2025-02-26 00:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:42:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:43:05
    [end_date_ymd] => 2025-02-26 00:43:05
    [RateCDR] => 1
)
  
[2025-02-26 00:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:43:05' and `end` < '2025-02-26 00:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:43:17] Production.INFO: count ==306  
[2025-02-26 00:43:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:43:05 - End Time 2025-02-26 00:43:05  
[2025-02-26 00:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558175', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558175', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:43:17] Production.INFO: ProcessCDR(1,14558175,1,1,2)  
[2025-02-26 00:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:43:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:43:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:43:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:43:22] Production.INFO: ==7486== Releasing lock...  
[2025-02-26 00:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:43:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:44:05
    [end_date_ymd] => 2025-02-26 00:44:05
    [RateCDR] => 1
)
  
[2025-02-26 00:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:44:05' and `end` < '2025-02-26 00:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:44:17] Production.INFO: count ==306  
[2025-02-26 00:44:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:44:05 - End Time 2025-02-26 00:44:05  
[2025-02-26 00:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558180', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558180', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:44:17] Production.INFO: ProcessCDR(1,14558180,1,1,2)  
[2025-02-26 00:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:44:20] Production.INFO: ==7622== Releasing lock...  
[2025-02-26 00:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:44:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:45:05
    [end_date_ymd] => 2025-02-26 00:45:05
    [RateCDR] => 1
)
  
[2025-02-26 00:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:45:05' and `end` < '2025-02-26 00:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:45:17] Production.INFO: count ==306  
[2025-02-26 00:45:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:45:05 - End Time 2025-02-26 00:45:05  
[2025-02-26 00:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558185', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558185', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:45:17] Production.INFO: ProcessCDR(1,14558185,1,1,2)  
[2025-02-26 00:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:45:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:45:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:45:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:45:20] Production.INFO: ==7721== Releasing lock...  
[2025-02-26 00:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:45:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:46:05
    [end_date_ymd] => 2025-02-26 00:46:05
    [RateCDR] => 1
)
  
[2025-02-26 00:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:46:05' and `end` < '2025-02-26 00:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:46:17] Production.INFO: count ==302  
[2025-02-26 00:46:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:46:05 - End Time 2025-02-26 00:46:05  
[2025-02-26 00:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558190', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558190', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:46:17] Production.INFO: ProcessCDR(1,14558190,1,1,2)  
[2025-02-26 00:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:46:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:46:20] Production.INFO: ==7818== Releasing lock...  
[2025-02-26 00:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:46:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:47:05
    [end_date_ymd] => 2025-02-26 00:47:05
    [RateCDR] => 1
)
  
[2025-02-26 00:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:47:05' and `end` < '2025-02-26 00:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:47:17] Production.INFO: count ==302  
[2025-02-26 00:47:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:47:05 - End Time 2025-02-26 00:47:05  
[2025-02-26 00:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558195', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558195', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558195', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558195', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:47:17] Production.INFO: ProcessCDR(1,14558195,1,1,2)  
[2025-02-26 00:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558195', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558195', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:47:20] Production.INFO: ==7913== Releasing lock...  
[2025-02-26 00:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:47:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:48:05
    [end_date_ymd] => 2025-02-26 00:48:05
    [RateCDR] => 1
)
  
[2025-02-26 00:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:48:05' and `end` < '2025-02-26 00:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:48:17] Production.INFO: count ==302  
[2025-02-26 00:48:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:48:05 - End Time 2025-02-26 00:48:05  
[2025-02-26 00:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558200', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558200', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558200', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558200', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:48:17] Production.INFO: ProcessCDR(1,14558200,1,1,2)  
[2025-02-26 00:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558200', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558200', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:48:21] Production.INFO: ==8012== Releasing lock...  
[2025-02-26 00:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:48:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 00:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:49:05
    [end_date_ymd] => 2025-02-26 00:49:05
    [RateCDR] => 1
)
  
[2025-02-26 00:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:49:05' and `end` < '2025-02-26 00:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:49:17] Production.INFO: count ==297  
[2025-02-26 00:49:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:49:05 - End Time 2025-02-26 00:49:05  
[2025-02-26 00:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558205', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558205', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558205', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558205', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:49:17] Production.INFO: ProcessCDR(1,14558205,1,1,2)  
[2025-02-26 00:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558205', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558205', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:49:20] Production.INFO: ==8110== Releasing lock...  
[2025-02-26 00:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:49:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:50:06
    [end_date_ymd] => 2025-02-26 00:50:06
    [RateCDR] => 1
)
  
[2025-02-26 00:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:50:06' and `end` < '2025-02-26 00:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:50:18] Production.INFO: count ==297  
[2025-02-26 00:50:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:50:06 - End Time 2025-02-26 00:50:06  
[2025-02-26 00:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558211', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558211', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:50:18] Production.INFO: ProcessCDR(1,14558211,1,1,2)  
[2025-02-26 00:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:50:22] Production.INFO: ==8212== Releasing lock...  
[2025-02-26 00:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:50:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:51:05
    [end_date_ymd] => 2025-02-26 00:51:05
    [RateCDR] => 1
)
  
[2025-02-26 00:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:51:05' and `end` < '2025-02-26 00:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:51:17] Production.INFO: count ==295  
[2025-02-26 00:51:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:51:05 - End Time 2025-02-26 00:51:05  
[2025-02-26 00:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558216', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558216', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:51:17] Production.INFO: ProcessCDR(1,14558216,1,1,2)  
[2025-02-26 00:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:51:20] Production.INFO: ==8308== Releasing lock...  
[2025-02-26 00:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:51:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:52:05
    [end_date_ymd] => 2025-02-26 00:52:05
    [RateCDR] => 1
)
  
[2025-02-26 00:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:52:05' and `end` < '2025-02-26 00:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:52:17] Production.INFO: count ==295  
[2025-02-26 00:52:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:52:05 - End Time 2025-02-26 00:52:05  
[2025-02-26 00:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558221', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558221', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:52:17] Production.INFO: ProcessCDR(1,14558221,1,1,2)  
[2025-02-26 00:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:52:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:52:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:52:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:52:20] Production.INFO: ==8399== Releasing lock...  
[2025-02-26 00:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:52:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:53:05
    [end_date_ymd] => 2025-02-26 00:53:05
    [RateCDR] => 1
)
  
[2025-02-26 00:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:53:05' and `end` < '2025-02-26 00:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:53:17] Production.INFO: count ==295  
[2025-02-26 00:53:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:53:05 - End Time 2025-02-26 00:53:05  
[2025-02-26 00:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558226', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558226', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:53:17] Production.INFO: ProcessCDR(1,14558226,1,1,2)  
[2025-02-26 00:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:53:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:53:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:53:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:53:20] Production.INFO: ==8493== Releasing lock...  
[2025-02-26 00:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:53:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:54:05
    [end_date_ymd] => 2025-02-26 00:54:05
    [RateCDR] => 1
)
  
[2025-02-26 00:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:54:05' and `end` < '2025-02-26 00:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:54:17] Production.INFO: count ==293  
[2025-02-26 00:54:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:54:05 - End Time 2025-02-26 00:54:05  
[2025-02-26 00:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558231', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558231', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:54:17] Production.INFO: ProcessCDR(1,14558231,1,1,2)  
[2025-02-26 00:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:54:21] Production.INFO: ==8589== Releasing lock...  
[2025-02-26 00:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:54:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:55:05
    [end_date_ymd] => 2025-02-26 00:55:05
    [RateCDR] => 1
)
  
[2025-02-26 00:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:55:05' and `end` < '2025-02-26 00:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:55:17] Production.INFO: count ==293  
[2025-02-26 00:55:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:55:05 - End Time 2025-02-26 00:55:05  
[2025-02-26 00:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558236', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558236', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:55:17] Production.INFO: ProcessCDR(1,14558236,1,1,2)  
[2025-02-26 00:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:55:20] Production.INFO: ==8686== Releasing lock...  
[2025-02-26 00:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:55:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:56:05
    [end_date_ymd] => 2025-02-26 00:56:05
    [RateCDR] => 1
)
  
[2025-02-26 00:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:56:05' and `end` < '2025-02-26 00:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:56:17] Production.INFO: count ==292  
[2025-02-26 00:56:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:56:05 - End Time 2025-02-26 00:56:05  
[2025-02-26 00:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558241', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558241', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558241', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558241', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:56:18] Production.INFO: ProcessCDR(1,14558241,1,1,2)  
[2025-02-26 00:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558241', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558241', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:56:21] Production.INFO: ==8769== Releasing lock...  
[2025-02-26 00:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:56:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:57:05
    [end_date_ymd] => 2025-02-26 00:57:05
    [RateCDR] => 1
)
  
[2025-02-26 00:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:57:05' and `end` < '2025-02-26 00:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:57:17] Production.INFO: count ==292  
[2025-02-26 00:57:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:57:05 - End Time 2025-02-26 00:57:05  
[2025-02-26 00:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558246', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558246', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558246', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558246', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:57:17] Production.INFO: ProcessCDR(1,14558246,1,1,2)  
[2025-02-26 00:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558246', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558246', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:57:20] Production.INFO: ==8840== Releasing lock...  
[2025-02-26 00:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:57:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 00:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:58:06
    [end_date_ymd] => 2025-02-26 00:58:06
    [RateCDR] => 1
)
  
[2025-02-26 00:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:58:06' and `end` < '2025-02-26 00:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:58:18] Production.INFO: count ==290  
[2025-02-26 00:58:18] Production.ERROR: pbx CDR StartTime 2025-02-25 21:58:06 - End Time 2025-02-26 00:58:06  
[2025-02-26 00:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558251', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558251', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558251', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558251', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:58:18] Production.INFO: ProcessCDR(1,14558251,1,1,2)  
[2025-02-26 00:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558251', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558251', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:58:21] Production.INFO: ==8922== Releasing lock...  
[2025-02-26 00:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:58:21] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 00:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 21:59:05
    [end_date_ymd] => 2025-02-26 00:59:05
    [RateCDR] => 1
)
  
[2025-02-26 00:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 21:59:05' and `end` < '2025-02-26 00:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 00:59:17] Production.INFO: count ==290  
[2025-02-26 00:59:17] Production.ERROR: pbx CDR StartTime 2025-02-25 21:59:05 - End Time 2025-02-26 00:59:05  
[2025-02-26 00:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 00:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558256', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558256', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558256', 'tblTempVendorCDR_20' ) start  
[2025-02-26 00:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558256', 'tblTempVendorCDR_20' ) end  
[2025-02-26 00:59:17] Production.INFO: ProcessCDR(1,14558256,1,1,2)  
[2025-02-26 00:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 00:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 00:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558256', 'tblTempUsageDetail_20' ) start  
[2025-02-26 00:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558256', 'tblTempUsageDetail_20' ) end  
[2025-02-26 00:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 00:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 00:59:20] Production.INFO: ==8996== Releasing lock...  
[2025-02-26 00:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 00:59:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 01:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:00:06
    [end_date_ymd] => 2025-02-26 01:00:06
    [RateCDR] => 1
)
  
[2025-02-26 01:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:00:06' and `end` < '2025-02-26 01:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:00:18] Production.INFO: count ==290  
[2025-02-26 01:00:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:00:06 - End Time 2025-02-26 01:00:06  
[2025-02-26 01:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558262', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558262', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:00:18] Production.INFO: ProcessCDR(1,14558262,1,1,2)  
[2025-02-26 01:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:00:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:00:22] Production.INFO: ==9114== Releasing lock...  
[2025-02-26 01:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:00:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:01:05
    [end_date_ymd] => 2025-02-26 01:01:05
    [RateCDR] => 1
)
  
[2025-02-26 01:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:01:05' and `end` < '2025-02-26 01:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:01:17] Production.INFO: count ==314  
[2025-02-26 01:01:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:01:05 - End Time 2025-02-26 01:01:05  
[2025-02-26 01:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558267', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558267', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:01:17] Production.INFO: ProcessCDR(1,14558267,1,1,2)  
[2025-02-26 01:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:01:20] Production.INFO: ==9206== Releasing lock...  
[2025-02-26 01:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:01:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 01:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:02:05
    [end_date_ymd] => 2025-02-26 01:02:05
    [RateCDR] => 1
)
  
[2025-02-26 01:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:02:05' and `end` < '2025-02-26 01:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:02:17] Production.INFO: count ==312  
[2025-02-26 01:02:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:02:05 - End Time 2025-02-26 01:02:05  
[2025-02-26 01:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558272', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558272', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:02:17] Production.INFO: ProcessCDR(1,14558272,1,1,2)  
[2025-02-26 01:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:02:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:02:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:02:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:02:20] Production.INFO: ==9287== Releasing lock...  
[2025-02-26 01:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:02:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 01:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:03:05
    [end_date_ymd] => 2025-02-26 01:03:05
    [RateCDR] => 1
)
  
[2025-02-26 01:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:03:05' and `end` < '2025-02-26 01:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:03:17] Production.INFO: count ==311  
[2025-02-26 01:03:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:03:05 - End Time 2025-02-26 01:03:05  
[2025-02-26 01:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558277', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558277', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:03:17] Production.INFO: ProcessCDR(1,14558277,1,1,2)  
[2025-02-26 01:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:03:20] Production.INFO: ==9366== Releasing lock...  
[2025-02-26 01:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:03:20] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 01:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:04:05
    [end_date_ymd] => 2025-02-26 01:04:05
    [RateCDR] => 1
)
  
[2025-02-26 01:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:04:05' and `end` < '2025-02-26 01:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:04:17] Production.INFO: count ==307  
[2025-02-26 01:04:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:04:05 - End Time 2025-02-26 01:04:05  
[2025-02-26 01:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558282', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558282', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:04:17] Production.INFO: ProcessCDR(1,14558282,1,1,2)  
[2025-02-26 01:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:04:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:04:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:04:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:04:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:04:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:04:20] Production.INFO: ==9439== Releasing lock...  
[2025-02-26 01:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:04:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 01:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:05:05
    [end_date_ymd] => 2025-02-26 01:05:05
    [RateCDR] => 1
)
  
[2025-02-26 01:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:05:05' and `end` < '2025-02-26 01:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:05:17] Production.INFO: count ==299  
[2025-02-26 01:05:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:05:05 - End Time 2025-02-26 01:05:05  
[2025-02-26 01:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558287', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558287', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:05:17] Production.INFO: ProcessCDR(1,14558287,1,1,2)  
[2025-02-26 01:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:05:20] Production.INFO: ==9514== Releasing lock...  
[2025-02-26 01:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:05:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:06:05
    [end_date_ymd] => 2025-02-26 01:06:05
    [RateCDR] => 1
)
  
[2025-02-26 01:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:06:05' and `end` < '2025-02-26 01:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:06:17] Production.INFO: count ==299  
[2025-02-26 01:06:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:06:05 - End Time 2025-02-26 01:06:05  
[2025-02-26 01:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558292', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558292', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558292', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558292', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:06:17] Production.INFO: ProcessCDR(1,14558292,1,1,2)  
[2025-02-26 01:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:06:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558292', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558292', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:06:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:06:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:06:20] Production.INFO: ==9587== Releasing lock...  
[2025-02-26 01:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:06:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:07:05
    [end_date_ymd] => 2025-02-26 01:07:05
    [RateCDR] => 1
)
  
[2025-02-26 01:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:07:05' and `end` < '2025-02-26 01:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:07:17] Production.INFO: count ==298  
[2025-02-26 01:07:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:07:05 - End Time 2025-02-26 01:07:05  
[2025-02-26 01:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558297', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558297', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558297', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558297', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:07:17] Production.INFO: ProcessCDR(1,14558297,1,1,2)  
[2025-02-26 01:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558297', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558297', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:07:20] Production.INFO: ==9661== Releasing lock...  
[2025-02-26 01:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:07:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:08:05
    [end_date_ymd] => 2025-02-26 01:08:05
    [RateCDR] => 1
)
  
[2025-02-26 01:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:08:05' and `end` < '2025-02-26 01:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:08:17] Production.INFO: count ==298  
[2025-02-26 01:08:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:08:05 - End Time 2025-02-26 01:08:05  
[2025-02-26 01:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558302', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558302', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558302', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558302', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:08:17] Production.INFO: ProcessCDR(1,14558302,1,1,2)  
[2025-02-26 01:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558302', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558302', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:08:20] Production.INFO: ==9733== Releasing lock...  
[2025-02-26 01:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:08:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:09:05
    [end_date_ymd] => 2025-02-26 01:09:05
    [RateCDR] => 1
)
  
[2025-02-26 01:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:09:05' and `end` < '2025-02-26 01:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:09:17] Production.INFO: count ==297  
[2025-02-26 01:09:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:09:05 - End Time 2025-02-26 01:09:05  
[2025-02-26 01:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558307', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558307', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558307', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558307', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:09:17] Production.INFO: ProcessCDR(1,14558307,1,1,2)  
[2025-02-26 01:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558307', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558307', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:09:20] Production.INFO: ==9808== Releasing lock...  
[2025-02-26 01:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:09:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:10:05
    [end_date_ymd] => 2025-02-26 01:10:05
    [RateCDR] => 1
)
  
[2025-02-26 01:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:10:05' and `end` < '2025-02-26 01:10:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:10:17] Production.INFO: count ==305  
[2025-02-26 01:10:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:10:05 - End Time 2025-02-26 01:10:05  
[2025-02-26 01:10:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558313', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558313', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:10:17] Production.INFO: ProcessCDR(1,14558313,1,1,2)  
[2025-02-26 01:10:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:10:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:10:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:10:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:10:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:10:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:10:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:10:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:10:20] Production.INFO: ==9883== Releasing lock...  
[2025-02-26 01:10:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:10:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:11:05
    [end_date_ymd] => 2025-02-26 01:11:05
    [RateCDR] => 1
)
  
[2025-02-26 01:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:11:05' and `end` < '2025-02-26 01:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:11:17] Production.INFO: count ==309  
[2025-02-26 01:11:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:11:05 - End Time 2025-02-26 01:11:05  
[2025-02-26 01:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558318', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558318', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:11:17] Production.INFO: ProcessCDR(1,14558318,1,1,2)  
[2025-02-26 01:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:11:20] Production.INFO: ==9957== Releasing lock...  
[2025-02-26 01:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:11:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:12:05
    [end_date_ymd] => 2025-02-26 01:12:05
    [RateCDR] => 1
)
  
[2025-02-26 01:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:12:05' and `end` < '2025-02-26 01:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:12:17] Production.INFO: count ==309  
[2025-02-26 01:12:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:12:05 - End Time 2025-02-26 01:12:05  
[2025-02-26 01:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558323', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558323', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:12:17] Production.INFO: ProcessCDR(1,14558323,1,1,2)  
[2025-02-26 01:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:12:20] Production.INFO: ==10028== Releasing lock...  
[2025-02-26 01:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:12:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:13:05
    [end_date_ymd] => 2025-02-26 01:13:05
    [RateCDR] => 1
)
  
[2025-02-26 01:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:13:05' and `end` < '2025-02-26 01:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:13:17] Production.INFO: count ==309  
[2025-02-26 01:13:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:13:05 - End Time 2025-02-26 01:13:05  
[2025-02-26 01:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558328', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558328', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:13:17] Production.INFO: ProcessCDR(1,14558328,1,1,2)  
[2025-02-26 01:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:13:20] Production.INFO: ==10108== Releasing lock...  
[2025-02-26 01:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:13:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:14:05
    [end_date_ymd] => 2025-02-26 01:14:05
    [RateCDR] => 1
)
  
[2025-02-26 01:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:14:05' and `end` < '2025-02-26 01:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:14:17] Production.INFO: count ==305  
[2025-02-26 01:14:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:14:05 - End Time 2025-02-26 01:14:05  
[2025-02-26 01:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558333', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558333', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:14:17] Production.INFO: ProcessCDR(1,14558333,1,1,2)  
[2025-02-26 01:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:14:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:14:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:14:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:14:20] Production.INFO: ==10178== Releasing lock...  
[2025-02-26 01:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:14:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:15:05
    [end_date_ymd] => 2025-02-26 01:15:05
    [RateCDR] => 1
)
  
[2025-02-26 01:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:15:05' and `end` < '2025-02-26 01:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:15:17] Production.INFO: count ==306  
[2025-02-26 01:15:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:15:05 - End Time 2025-02-26 01:15:05  
[2025-02-26 01:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558338', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558338', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558338', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558338', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:15:17] Production.INFO: ProcessCDR(1,14558338,1,1,2)  
[2025-02-26 01:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558338', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558338', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:15:22] Production.INFO: ==10288== Releasing lock...  
[2025-02-26 01:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:15:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:16:05
    [end_date_ymd] => 2025-02-26 01:16:05
    [RateCDR] => 1
)
  
[2025-02-26 01:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:16:05' and `end` < '2025-02-26 01:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:16:17] Production.INFO: count ==306  
[2025-02-26 01:16:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:16:05 - End Time 2025-02-26 01:16:05  
[2025-02-26 01:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558343', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558343', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558343', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558343', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:16:17] Production.INFO: ProcessCDR(1,14558343,1,1,2)  
[2025-02-26 01:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558343', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558343', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:16:20] Production.INFO: ==10360== Releasing lock...  
[2025-02-26 01:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:16:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:17:06
    [end_date_ymd] => 2025-02-26 01:17:06
    [RateCDR] => 1
)
  
[2025-02-26 01:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:17:06' and `end` < '2025-02-26 01:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:17:17] Production.INFO: count ==302  
[2025-02-26 01:17:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:17:06 - End Time 2025-02-26 01:17:06  
[2025-02-26 01:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558348', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558348', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558348', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558348', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:17:17] Production.INFO: ProcessCDR(1,14558348,1,1,2)  
[2025-02-26 01:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558348', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558348', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:17:21] Production.INFO: ==10436== Releasing lock...  
[2025-02-26 01:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:17:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:18:05
    [end_date_ymd] => 2025-02-26 01:18:05
    [RateCDR] => 1
)
  
[2025-02-26 01:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:18:05' and `end` < '2025-02-26 01:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:18:17] Production.INFO: count ==300  
[2025-02-26 01:18:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:18:05 - End Time 2025-02-26 01:18:05  
[2025-02-26 01:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558353', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558353', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558353', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558353', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:18:17] Production.INFO: ProcessCDR(1,14558353,1,1,2)  
[2025-02-26 01:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558353', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558353', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:18:20] Production.INFO: ==10512== Releasing lock...  
[2025-02-26 01:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:18:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:19:05
    [end_date_ymd] => 2025-02-26 01:19:05
    [RateCDR] => 1
)
  
[2025-02-26 01:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:19:05' and `end` < '2025-02-26 01:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:19:17] Production.INFO: count ==300  
[2025-02-26 01:19:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:19:05 - End Time 2025-02-26 01:19:05  
[2025-02-26 01:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558358', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558358', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558358', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558358', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:19:17] Production.INFO: ProcessCDR(1,14558358,1,1,2)  
[2025-02-26 01:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558358', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558358', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:19:20] Production.INFO: ==10584== Releasing lock...  
[2025-02-26 01:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:19:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:20:06
    [end_date_ymd] => 2025-02-26 01:20:06
    [RateCDR] => 1
)
  
[2025-02-26 01:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:20:06' and `end` < '2025-02-26 01:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:20:18] Production.INFO: count ==304  
[2025-02-26 01:20:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:20:06 - End Time 2025-02-26 01:20:06  
[2025-02-26 01:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558364', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558364', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:20:18] Production.INFO: ProcessCDR(1,14558364,1,1,2)  
[2025-02-26 01:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:20:22] Production.INFO: ==10658== Releasing lock...  
[2025-02-26 01:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:20:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:21:05
    [end_date_ymd] => 2025-02-26 01:21:05
    [RateCDR] => 1
)
  
[2025-02-26 01:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:21:05' and `end` < '2025-02-26 01:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:21:17] Production.INFO: count ==304  
[2025-02-26 01:21:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:21:05 - End Time 2025-02-26 01:21:05  
[2025-02-26 01:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558369', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558369', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:21:17] Production.INFO: ProcessCDR(1,14558369,1,1,2)  
[2025-02-26 01:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:21:20] Production.INFO: ==10731== Releasing lock...  
[2025-02-26 01:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:21:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:22:05
    [end_date_ymd] => 2025-02-26 01:22:05
    [RateCDR] => 1
)
  
[2025-02-26 01:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:22:05' and `end` < '2025-02-26 01:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:22:17] Production.INFO: count ==300  
[2025-02-26 01:22:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:22:05 - End Time 2025-02-26 01:22:05  
[2025-02-26 01:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558374', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558374', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558374', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558374', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:22:17] Production.INFO: ProcessCDR(1,14558374,1,1,2)  
[2025-02-26 01:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558374', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558374', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:22:22] Production.INFO: ==10805== Releasing lock...  
[2025-02-26 01:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:22:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:23:05
    [end_date_ymd] => 2025-02-26 01:23:05
    [RateCDR] => 1
)
  
[2025-02-26 01:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:23:05' and `end` < '2025-02-26 01:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:23:16] Production.INFO: count ==296  
[2025-02-26 01:23:16] Production.ERROR: pbx CDR StartTime 2025-02-25 22:23:05 - End Time 2025-02-26 01:23:05  
[2025-02-26 01:23:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558379', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558379', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558379', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558379', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:23:16] Production.INFO: ProcessCDR(1,14558379,1,1,2)  
[2025-02-26 01:23:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:23:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:23:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:23:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558379', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558379', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:23:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:23:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:23:20] Production.INFO: ==10892== Releasing lock...  
[2025-02-26 01:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:23:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:24:05
    [end_date_ymd] => 2025-02-26 01:24:05
    [RateCDR] => 1
)
  
[2025-02-26 01:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:24:05' and `end` < '2025-02-26 01:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:24:17] Production.INFO: count ==300  
[2025-02-26 01:24:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:24:05 - End Time 2025-02-26 01:24:05  
[2025-02-26 01:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558384', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558384', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558384', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558384', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:24:17] Production.INFO: ProcessCDR(1,14558384,1,1,2)  
[2025-02-26 01:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:24:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558384', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558384', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:24:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:24:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:24:20] Production.INFO: ==10967== Releasing lock...  
[2025-02-26 01:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:24:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:25:05
    [end_date_ymd] => 2025-02-26 01:25:05
    [RateCDR] => 1
)
  
[2025-02-26 01:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:25:05' and `end` < '2025-02-26 01:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:25:17] Production.INFO: count ==303  
[2025-02-26 01:25:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:25:05 - End Time 2025-02-26 01:25:05  
[2025-02-26 01:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558389', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558389', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558389', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558389', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:25:17] Production.INFO: ProcessCDR(1,14558389,1,1,2)  
[2025-02-26 01:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558389', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558389', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:25:20] Production.INFO: ==11040== Releasing lock...  
[2025-02-26 01:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:25:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:26:05
    [end_date_ymd] => 2025-02-26 01:26:05
    [RateCDR] => 1
)
  
[2025-02-26 01:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:26:05' and `end` < '2025-02-26 01:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:26:17] Production.INFO: count ==302  
[2025-02-26 01:26:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:26:05 - End Time 2025-02-26 01:26:05  
[2025-02-26 01:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558394', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558394', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558394', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558394', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:26:17] Production.INFO: ProcessCDR(1,14558394,1,1,2)  
[2025-02-26 01:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:26:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558394', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558394', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:26:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:26:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:26:20] Production.INFO: ==11111== Releasing lock...  
[2025-02-26 01:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:26:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:27:05
    [end_date_ymd] => 2025-02-26 01:27:05
    [RateCDR] => 1
)
  
[2025-02-26 01:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:27:05' and `end` < '2025-02-26 01:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:27:17] Production.INFO: count ==296  
[2025-02-26 01:27:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:27:05 - End Time 2025-02-26 01:27:05  
[2025-02-26 01:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558399', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558399', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558399', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558399', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:27:17] Production.INFO: ProcessCDR(1,14558399,1,1,2)  
[2025-02-26 01:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558399', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558399', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:27:20] Production.INFO: ==11187== Releasing lock...  
[2025-02-26 01:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:27:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:28:05
    [end_date_ymd] => 2025-02-26 01:28:05
    [RateCDR] => 1
)
  
[2025-02-26 01:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:28:05' and `end` < '2025-02-26 01:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:28:17] Production.INFO: count ==295  
[2025-02-26 01:28:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:28:05 - End Time 2025-02-26 01:28:05  
[2025-02-26 01:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558404', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558404', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558404', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558404', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:28:17] Production.INFO: ProcessCDR(1,14558404,1,1,2)  
[2025-02-26 01:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558404', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558404', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:28:21] Production.INFO: ==11261== Releasing lock...  
[2025-02-26 01:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:28:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:29:05
    [end_date_ymd] => 2025-02-26 01:29:05
    [RateCDR] => 1
)
  
[2025-02-26 01:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:29:05' and `end` < '2025-02-26 01:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:29:17] Production.INFO: count ==295  
[2025-02-26 01:29:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:29:05 - End Time 2025-02-26 01:29:05  
[2025-02-26 01:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558409', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558409', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558409', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558409', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:29:17] Production.INFO: ProcessCDR(1,14558409,1,1,2)  
[2025-02-26 01:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558409', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558409', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:29:20] Production.INFO: ==11330== Releasing lock...  
[2025-02-26 01:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:29:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:30:06
    [end_date_ymd] => 2025-02-26 01:30:06
    [RateCDR] => 1
)
  
[2025-02-26 01:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:30:06' and `end` < '2025-02-26 01:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:30:18] Production.INFO: count ==300  
[2025-02-26 01:30:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:30:06 - End Time 2025-02-26 01:30:06  
[2025-02-26 01:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558415', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558415', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:30:18] Production.INFO: ProcessCDR(1,14558415,1,1,2)  
[2025-02-26 01:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:30:21] Production.INFO: ==11442== Releasing lock...  
[2025-02-26 01:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:30:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:31:05
    [end_date_ymd] => 2025-02-26 01:31:05
    [RateCDR] => 1
)
  
[2025-02-26 01:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:31:05' and `end` < '2025-02-26 01:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:31:16] Production.INFO: count ==307  
[2025-02-26 01:31:16] Production.ERROR: pbx CDR StartTime 2025-02-25 22:31:05 - End Time 2025-02-26 01:31:05  
[2025-02-26 01:31:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:31:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:31:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:31:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558420', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:31:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558420', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:31:16] Production.INFO: ProcessCDR(1,14558420,1,1,2)  
[2025-02-26 01:31:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:31:20] Production.INFO: ==11525== Releasing lock...  
[2025-02-26 01:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:31:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:32:05
    [end_date_ymd] => 2025-02-26 01:32:05
    [RateCDR] => 1
)
  
[2025-02-26 01:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:32:05' and `end` < '2025-02-26 01:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:32:17] Production.INFO: count ==310  
[2025-02-26 01:32:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:32:05 - End Time 2025-02-26 01:32:05  
[2025-02-26 01:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558425', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558425', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558425', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558425', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:32:17] Production.INFO: ProcessCDR(1,14558425,1,1,2)  
[2025-02-26 01:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558425', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558425', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:32:21] Production.INFO: ==11608== Releasing lock...  
[2025-02-26 01:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:32:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:33:06
    [end_date_ymd] => 2025-02-26 01:33:06
    [RateCDR] => 1
)
  
[2025-02-26 01:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:33:06' and `end` < '2025-02-26 01:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:33:18] Production.INFO: count ==306  
[2025-02-26 01:33:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:33:06 - End Time 2025-02-26 01:33:06  
[2025-02-26 01:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558430', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558430', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558430', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558430', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:33:18] Production.INFO: ProcessCDR(1,14558430,1,1,2)  
[2025-02-26 01:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:33:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:33:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558430', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558430', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:33:22] Production.INFO: ==11680== Releasing lock...  
[2025-02-26 01:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:33:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:34:06
    [end_date_ymd] => 2025-02-26 01:34:06
    [RateCDR] => 1
)
  
[2025-02-26 01:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:34:06' and `end` < '2025-02-26 01:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:34:18] Production.INFO: count ==302  
[2025-02-26 01:34:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:34:06 - End Time 2025-02-26 01:34:06  
[2025-02-26 01:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558435', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558435', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558435', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558435', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:34:18] Production.INFO: ProcessCDR(1,14558435,1,1,2)  
[2025-02-26 01:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558435', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558435', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:34:21] Production.INFO: ==11755== Releasing lock...  
[2025-02-26 01:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:34:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:35:06
    [end_date_ymd] => 2025-02-26 01:35:06
    [RateCDR] => 1
)
  
[2025-02-26 01:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:35:06' and `end` < '2025-02-26 01:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:35:18] Production.INFO: count ==302  
[2025-02-26 01:35:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:35:06 - End Time 2025-02-26 01:35:06  
[2025-02-26 01:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558440', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558440', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558440', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558440', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:35:18] Production.INFO: ProcessCDR(1,14558440,1,1,2)  
[2025-02-26 01:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558440', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558440', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:35:21] Production.INFO: ==11825== Releasing lock...  
[2025-02-26 01:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:35:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:36:05
    [end_date_ymd] => 2025-02-26 01:36:05
    [RateCDR] => 1
)
  
[2025-02-26 01:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:36:05' and `end` < '2025-02-26 01:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:36:17] Production.INFO: count ==302  
[2025-02-26 01:36:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:36:05 - End Time 2025-02-26 01:36:05  
[2025-02-26 01:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558445', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558445', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558445', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558445', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:36:17] Production.INFO: ProcessCDR(1,14558445,1,1,2)  
[2025-02-26 01:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558445', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558445', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:36:21] Production.INFO: ==11897== Releasing lock...  
[2025-02-26 01:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:36:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:37:06
    [end_date_ymd] => 2025-02-26 01:37:06
    [RateCDR] => 1
)
  
[2025-02-26 01:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:37:06' and `end` < '2025-02-26 01:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:37:18] Production.INFO: count ==299  
[2025-02-26 01:37:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:37:06 - End Time 2025-02-26 01:37:06  
[2025-02-26 01:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558450', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558450', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558450', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558450', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:37:18] Production.INFO: ProcessCDR(1,14558450,1,1,2)  
[2025-02-26 01:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558450', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558450', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:37:22] Production.INFO: ==11983== Releasing lock...  
[2025-02-26 01:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:37:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:38:06
    [end_date_ymd] => 2025-02-26 01:38:06
    [RateCDR] => 1
)
  
[2025-02-26 01:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:38:06' and `end` < '2025-02-26 01:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:38:18] Production.INFO: count ==298  
[2025-02-26 01:38:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:38:06 - End Time 2025-02-26 01:38:06  
[2025-02-26 01:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558455', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558455', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558455', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558455', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:38:18] Production.INFO: ProcessCDR(1,14558455,1,1,2)  
[2025-02-26 01:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558455', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558455', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:38:21] Production.INFO: ==12060== Releasing lock...  
[2025-02-26 01:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:38:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:39:06
    [end_date_ymd] => 2025-02-26 01:39:06
    [RateCDR] => 1
)
  
[2025-02-26 01:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:39:06' and `end` < '2025-02-26 01:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:39:18] Production.INFO: count ==298  
[2025-02-26 01:39:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:39:06 - End Time 2025-02-26 01:39:06  
[2025-02-26 01:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558460', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558460', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558460', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558460', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:39:18] Production.INFO: ProcessCDR(1,14558460,1,1,2)  
[2025-02-26 01:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558460', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558460', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:39:22] Production.INFO: ==12131== Releasing lock...  
[2025-02-26 01:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:39:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:40:06
    [end_date_ymd] => 2025-02-26 01:40:06
    [RateCDR] => 1
)
  
[2025-02-26 01:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:40:06' and `end` < '2025-02-26 01:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:40:18] Production.INFO: count ==302  
[2025-02-26 01:40:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:40:06 - End Time 2025-02-26 01:40:06  
[2025-02-26 01:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558465', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558465', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558465', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558465', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:40:18] Production.INFO: ProcessCDR(1,14558465,1,1,2)  
[2025-02-26 01:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558465', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558465', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:40:22] Production.INFO: ==12203== Releasing lock...  
[2025-02-26 01:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:40:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:41:05
    [end_date_ymd] => 2025-02-26 01:41:05
    [RateCDR] => 1
)
  
[2025-02-26 01:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:41:05' and `end` < '2025-02-26 01:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:41:17] Production.INFO: count ==301  
[2025-02-26 01:41:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:41:05 - End Time 2025-02-26 01:41:05  
[2025-02-26 01:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558471', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558471', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:41:17] Production.INFO: ProcessCDR(1,14558471,1,1,2)  
[2025-02-26 01:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:41:21] Production.INFO: ==12285== Releasing lock...  
[2025-02-26 01:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:41:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:42:06
    [end_date_ymd] => 2025-02-26 01:42:06
    [RateCDR] => 1
)
  
[2025-02-26 01:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:42:06' and `end` < '2025-02-26 01:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:42:18] Production.INFO: count ==301  
[2025-02-26 01:42:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:42:06 - End Time 2025-02-26 01:42:06  
[2025-02-26 01:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558476', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558476', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558476', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558476', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:42:18] Production.INFO: ProcessCDR(1,14558476,1,1,2)  
[2025-02-26 01:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558476', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558476', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:42:21] Production.INFO: ==12357== Releasing lock...  
[2025-02-26 01:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:42:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:43:06
    [end_date_ymd] => 2025-02-26 01:43:06
    [RateCDR] => 1
)
  
[2025-02-26 01:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:43:06' and `end` < '2025-02-26 01:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:43:18] Production.INFO: count ==301  
[2025-02-26 01:43:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:43:06 - End Time 2025-02-26 01:43:06  
[2025-02-26 01:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558481', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558481', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558481', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558481', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:43:18] Production.INFO: ProcessCDR(1,14558481,1,1,2)  
[2025-02-26 01:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558481', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558481', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:43:21] Production.INFO: ==12428== Releasing lock...  
[2025-02-26 01:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:43:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:44:05
    [end_date_ymd] => 2025-02-26 01:44:05
    [RateCDR] => 1
)
  
[2025-02-26 01:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:44:05' and `end` < '2025-02-26 01:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:44:17] Production.INFO: count ==300  
[2025-02-26 01:44:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:44:05 - End Time 2025-02-26 01:44:05  
[2025-02-26 01:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558486', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558486', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558486', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558486', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:44:17] Production.INFO: ProcessCDR(1,14558486,1,1,2)  
[2025-02-26 01:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558486', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558486', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:44:21] Production.INFO: ==12501== Releasing lock...  
[2025-02-26 01:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:44:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:45:06
    [end_date_ymd] => 2025-02-26 01:45:06
    [RateCDR] => 1
)
  
[2025-02-26 01:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:45:06' and `end` < '2025-02-26 01:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:45:18] Production.INFO: count ==299  
[2025-02-26 01:45:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:45:06 - End Time 2025-02-26 01:45:06  
[2025-02-26 01:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558491', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558491', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558491', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558491', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:45:18] Production.INFO: ProcessCDR(1,14558491,1,1,2)  
[2025-02-26 01:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558491', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558491', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:45:21] Production.INFO: ==12571== Releasing lock...  
[2025-02-26 01:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:45:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:46:05
    [end_date_ymd] => 2025-02-26 01:46:05
    [RateCDR] => 1
)
  
[2025-02-26 01:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:46:05' and `end` < '2025-02-26 01:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:46:17] Production.INFO: count ==299  
[2025-02-26 01:46:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:46:05 - End Time 2025-02-26 01:46:05  
[2025-02-26 01:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558496', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558496', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558496', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558496', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:46:17] Production.INFO: ProcessCDR(1,14558496,1,1,2)  
[2025-02-26 01:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558496', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558496', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:46:21] Production.INFO: ==12682== Releasing lock...  
[2025-02-26 01:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:46:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:47:06
    [end_date_ymd] => 2025-02-26 01:47:06
    [RateCDR] => 1
)
  
[2025-02-26 01:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:47:06' and `end` < '2025-02-26 01:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:47:18] Production.INFO: count ==299  
[2025-02-26 01:47:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:47:06 - End Time 2025-02-26 01:47:06  
[2025-02-26 01:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558501', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558501', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558501', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558501', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:47:18] Production.INFO: ProcessCDR(1,14558501,1,1,2)  
[2025-02-26 01:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558501', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558501', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:47:21] Production.INFO: ==12755== Releasing lock...  
[2025-02-26 01:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:47:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:48:05
    [end_date_ymd] => 2025-02-26 01:48:05
    [RateCDR] => 1
)
  
[2025-02-26 01:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:48:05' and `end` < '2025-02-26 01:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:48:17] Production.INFO: count ==299  
[2025-02-26 01:48:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:48:05 - End Time 2025-02-26 01:48:05  
[2025-02-26 01:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558506', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558506', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558506', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558506', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:48:17] Production.INFO: ProcessCDR(1,14558506,1,1,2)  
[2025-02-26 01:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558506', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558506', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:48:21] Production.INFO: ==12830== Releasing lock...  
[2025-02-26 01:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:48:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:49:06
    [end_date_ymd] => 2025-02-26 01:49:06
    [RateCDR] => 1
)
  
[2025-02-26 01:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:49:06' and `end` < '2025-02-26 01:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:49:18] Production.INFO: count ==297  
[2025-02-26 01:49:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:49:06 - End Time 2025-02-26 01:49:06  
[2025-02-26 01:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558511', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558511', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558511', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558511', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:49:18] Production.INFO: ProcessCDR(1,14558511,1,1,2)  
[2025-02-26 01:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558511', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558511', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:49:21] Production.INFO: ==12905== Releasing lock...  
[2025-02-26 01:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:49:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 01:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:50:06
    [end_date_ymd] => 2025-02-26 01:50:06
    [RateCDR] => 1
)
  
[2025-02-26 01:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:50:06' and `end` < '2025-02-26 01:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:50:18] Production.INFO: count ==293  
[2025-02-26 01:50:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:50:06 - End Time 2025-02-26 01:50:06  
[2025-02-26 01:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558517', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558517', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:50:18] Production.INFO: ProcessCDR(1,14558517,1,1,2)  
[2025-02-26 01:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:50:22] Production.INFO: ==12986== Releasing lock...  
[2025-02-26 01:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:50:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:51:06
    [end_date_ymd] => 2025-02-26 01:51:06
    [RateCDR] => 1
)
  
[2025-02-26 01:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:51:06' and `end` < '2025-02-26 01:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:51:17] Production.INFO: count ==292  
[2025-02-26 01:51:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:51:06 - End Time 2025-02-26 01:51:06  
[2025-02-26 01:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558522', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558522', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:51:18] Production.INFO: ProcessCDR(1,14558522,1,1,2)  
[2025-02-26 01:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:51:21] Production.INFO: ==13060== Releasing lock...  
[2025-02-26 01:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:51:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:52:06
    [end_date_ymd] => 2025-02-26 01:52:06
    [RateCDR] => 1
)
  
[2025-02-26 01:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:52:06' and `end` < '2025-02-26 01:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:52:18] Production.INFO: count ==292  
[2025-02-26 01:52:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:52:06 - End Time 2025-02-26 01:52:06  
[2025-02-26 01:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558527', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558527', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:52:18] Production.INFO: ProcessCDR(1,14558527,1,1,2)  
[2025-02-26 01:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:52:22] Production.INFO: ==13139== Releasing lock...  
[2025-02-26 01:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:52:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:53:06
    [end_date_ymd] => 2025-02-26 01:53:06
    [RateCDR] => 1
)
  
[2025-02-26 01:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:53:06' and `end` < '2025-02-26 01:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:53:18] Production.INFO: count ==292  
[2025-02-26 01:53:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:53:06 - End Time 2025-02-26 01:53:06  
[2025-02-26 01:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558532', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558532', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558532', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558532', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:53:18] Production.INFO: ProcessCDR(1,14558532,1,1,2)  
[2025-02-26 01:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558532', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558532', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:53:22] Production.INFO: ==13213== Releasing lock...  
[2025-02-26 01:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:53:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:54:05
    [end_date_ymd] => 2025-02-26 01:54:05
    [RateCDR] => 1
)
  
[2025-02-26 01:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:54:05' and `end` < '2025-02-26 01:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:54:17] Production.INFO: count ==289  
[2025-02-26 01:54:17] Production.ERROR: pbx CDR StartTime 2025-02-25 22:54:05 - End Time 2025-02-26 01:54:05  
[2025-02-26 01:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558537', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558537', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558537', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558537', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:54:17] Production.INFO: ProcessCDR(1,14558537,1,1,2)  
[2025-02-26 01:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558537', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558537', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:54:21] Production.INFO: ==13282== Releasing lock...  
[2025-02-26 01:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:54:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:55:06
    [end_date_ymd] => 2025-02-26 01:55:06
    [RateCDR] => 1
)
  
[2025-02-26 01:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:55:06' and `end` < '2025-02-26 01:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:55:18] Production.INFO: count ==289  
[2025-02-26 01:55:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:55:06 - End Time 2025-02-26 01:55:06  
[2025-02-26 01:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558542', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558542', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558542', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558542', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:55:18] Production.INFO: ProcessCDR(1,14558542,1,1,2)  
[2025-02-26 01:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558542', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558542', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:55:22] Production.INFO: ==13354== Releasing lock...  
[2025-02-26 01:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:55:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:56:06
    [end_date_ymd] => 2025-02-26 01:56:06
    [RateCDR] => 1
)
  
[2025-02-26 01:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:56:06' and `end` < '2025-02-26 01:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:56:18] Production.INFO: count ==289  
[2025-02-26 01:56:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:56:06 - End Time 2025-02-26 01:56:06  
[2025-02-26 01:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558547', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558547', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558547', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558547', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:56:18] Production.INFO: ProcessCDR(1,14558547,1,1,2)  
[2025-02-26 01:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558547', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558547', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:56:21] Production.INFO: ==13430== Releasing lock...  
[2025-02-26 01:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:56:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:57:06
    [end_date_ymd] => 2025-02-26 01:57:06
    [RateCDR] => 1
)
  
[2025-02-26 01:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:57:06' and `end` < '2025-02-26 01:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:57:18] Production.INFO: count ==293  
[2025-02-26 01:57:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:57:06 - End Time 2025-02-26 01:57:06  
[2025-02-26 01:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558552', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558552', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558552', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558552', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:57:18] Production.INFO: ProcessCDR(1,14558552,1,1,2)  
[2025-02-26 01:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558552', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558552', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:57:21] Production.INFO: ==13503== Releasing lock...  
[2025-02-26 01:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:57:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 01:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:58:06
    [end_date_ymd] => 2025-02-26 01:58:06
    [RateCDR] => 1
)
  
[2025-02-26 01:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:58:06' and `end` < '2025-02-26 01:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:58:18] Production.INFO: count ==295  
[2025-02-26 01:58:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:58:06 - End Time 2025-02-26 01:58:06  
[2025-02-26 01:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558557', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558557', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558557', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558557', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:58:18] Production.INFO: ProcessCDR(1,14558557,1,1,2)  
[2025-02-26 01:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558557', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558557', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:58:21] Production.INFO: ==13574== Releasing lock...  
[2025-02-26 01:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:58:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 01:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 22:59:06
    [end_date_ymd] => 2025-02-26 01:59:06
    [RateCDR] => 1
)
  
[2025-02-26 01:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 22:59:06' and `end` < '2025-02-26 01:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 01:59:18] Production.INFO: count ==295  
[2025-02-26 01:59:18] Production.ERROR: pbx CDR StartTime 2025-02-25 22:59:06 - End Time 2025-02-26 01:59:06  
[2025-02-26 01:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 01:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558562', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558562', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558562', 'tblTempVendorCDR_20' ) start  
[2025-02-26 01:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558562', 'tblTempVendorCDR_20' ) end  
[2025-02-26 01:59:18] Production.INFO: ProcessCDR(1,14558562,1,1,2)  
[2025-02-26 01:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 01:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 01:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558562', 'tblTempUsageDetail_20' ) start  
[2025-02-26 01:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558562', 'tblTempUsageDetail_20' ) end  
[2025-02-26 01:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 01:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 01:59:21] Production.INFO: ==13654== Releasing lock...  
[2025-02-26 01:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 01:59:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:00:08] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:00:08
    [end_date_ymd] => 2025-02-26 02:00:08
    [RateCDR] => 1
)
  
[2025-02-26 02:00:08] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:00:08' and `end` < '2025-02-26 02:00:08'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:00:20] Production.INFO: count ==308  
[2025-02-26 02:00:20] Production.ERROR: pbx CDR StartTime 2025-02-25 23:00:08 - End Time 2025-02-26 02:00:08  
[2025-02-26 02:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558568', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558568', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:00:20] Production.INFO: ProcessCDR(1,14558568,1,1,2)  
[2025-02-26 02:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:00:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:00:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:00:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:00:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:00:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:00:26] Production.INFO: ==13736== Releasing lock...  
[2025-02-26 02:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:00:26] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:01:06
    [end_date_ymd] => 2025-02-26 02:01:06
    [RateCDR] => 1
)
  
[2025-02-26 02:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:01:06' and `end` < '2025-02-26 02:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:01:18] Production.INFO: count ==310  
[2025-02-26 02:01:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:01:06 - End Time 2025-02-26 02:01:06  
[2025-02-26 02:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558573', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558573', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:01:18] Production.INFO: ProcessCDR(1,14558573,1,1,2)  
[2025-02-26 02:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:01:22] Production.INFO: ==13957== Releasing lock...  
[2025-02-26 02:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:01:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:02:06
    [end_date_ymd] => 2025-02-26 02:02:06
    [RateCDR] => 1
)
  
[2025-02-26 02:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:02:06' and `end` < '2025-02-26 02:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:02:17] Production.INFO: count ==307  
[2025-02-26 02:02:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:02:06 - End Time 2025-02-26 02:02:06  
[2025-02-26 02:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558578', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558578', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:02:17] Production.INFO: ProcessCDR(1,14558578,1,1,2)  
[2025-02-26 02:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:02:21] Production.INFO: ==14030== Releasing lock...  
[2025-02-26 02:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:02:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:03:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:03:07
    [end_date_ymd] => 2025-02-26 02:03:07
    [RateCDR] => 1
)
  
[2025-02-26 02:03:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:03:07' and `end` < '2025-02-26 02:03:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:03:19] Production.INFO: count ==306  
[2025-02-26 02:03:19] Production.ERROR: pbx CDR StartTime 2025-02-25 23:03:07 - End Time 2025-02-26 02:03:07  
[2025-02-26 02:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558583', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558583', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558583', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558583', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:03:19] Production.INFO: ProcessCDR(1,14558583,1,1,2)  
[2025-02-26 02:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:03:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:03:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558583', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558583', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:03:22] Production.INFO: ==14103== Releasing lock...  
[2025-02-26 02:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:03:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:04:05
    [end_date_ymd] => 2025-02-26 02:04:05
    [RateCDR] => 1
)
  
[2025-02-26 02:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:04:05' and `end` < '2025-02-26 02:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:04:17] Production.INFO: count ==306  
[2025-02-26 02:04:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:04:05 - End Time 2025-02-26 02:04:05  
[2025-02-26 02:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558588', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558588', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558588', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558588', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:04:17] Production.INFO: ProcessCDR(1,14558588,1,1,2)  
[2025-02-26 02:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558588', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558588', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:04:21] Production.INFO: ==14178== Releasing lock...  
[2025-02-26 02:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:04:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:05:06
    [end_date_ymd] => 2025-02-26 02:05:06
    [RateCDR] => 1
)
  
[2025-02-26 02:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:05:06' and `end` < '2025-02-26 02:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:05:18] Production.INFO: count ==307  
[2025-02-26 02:05:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:05:06 - End Time 2025-02-26 02:05:06  
[2025-02-26 02:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558593', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558593', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558593', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558593', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:05:18] Production.INFO: ProcessCDR(1,14558593,1,1,2)  
[2025-02-26 02:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558593', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558593', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:05:22] Production.INFO: ==14256== Releasing lock...  
[2025-02-26 02:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:05:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:06:05
    [end_date_ymd] => 2025-02-26 02:06:05
    [RateCDR] => 1
)
  
[2025-02-26 02:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:06:05' and `end` < '2025-02-26 02:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:06:17] Production.INFO: count ==307  
[2025-02-26 02:06:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:06:05 - End Time 2025-02-26 02:06:05  
[2025-02-26 02:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558598', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558598', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558598', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558598', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:06:17] Production.INFO: ProcessCDR(1,14558598,1,1,2)  
[2025-02-26 02:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558598', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558598', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:06:21] Production.INFO: ==14329== Releasing lock...  
[2025-02-26 02:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:06:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:07:05
    [end_date_ymd] => 2025-02-26 02:07:05
    [RateCDR] => 1
)
  
[2025-02-26 02:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:07:05' and `end` < '2025-02-26 02:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:07:17] Production.INFO: count ==303  
[2025-02-26 02:07:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:07:05 - End Time 2025-02-26 02:07:05  
[2025-02-26 02:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558603', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558603', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558603', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558603', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:07:17] Production.INFO: ProcessCDR(1,14558603,1,1,2)  
[2025-02-26 02:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558603', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558603', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:07:20] Production.INFO: ==14400== Releasing lock...  
[2025-02-26 02:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:07:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:08:05
    [end_date_ymd] => 2025-02-26 02:08:05
    [RateCDR] => 1
)
  
[2025-02-26 02:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:08:05' and `end` < '2025-02-26 02:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:08:17] Production.INFO: count ==303  
[2025-02-26 02:08:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:08:05 - End Time 2025-02-26 02:08:05  
[2025-02-26 02:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558608', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558608', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558608', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558608', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:08:17] Production.INFO: ProcessCDR(1,14558608,1,1,2)  
[2025-02-26 02:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558608', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558608', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:08:21] Production.INFO: ==14490== Releasing lock...  
[2025-02-26 02:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:08:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:09:05
    [end_date_ymd] => 2025-02-26 02:09:05
    [RateCDR] => 1
)
  
[2025-02-26 02:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:09:05' and `end` < '2025-02-26 02:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:09:16] Production.INFO: count ==307  
[2025-02-26 02:09:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:09:05 - End Time 2025-02-26 02:09:05  
[2025-02-26 02:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558613', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558613', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558613', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558613', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:09:17] Production.INFO: ProcessCDR(1,14558613,1,1,2)  
[2025-02-26 02:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558613', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558613', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:09:20] Production.INFO: ==14568== Releasing lock...  
[2025-02-26 02:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:09:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:10:06
    [end_date_ymd] => 2025-02-26 02:10:06
    [RateCDR] => 1
)
  
[2025-02-26 02:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:10:06' and `end` < '2025-02-26 02:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:10:18] Production.INFO: count ==311  
[2025-02-26 02:10:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:10:06 - End Time 2025-02-26 02:10:06  
[2025-02-26 02:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558619', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558619', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:10:18] Production.INFO: ProcessCDR(1,14558619,1,1,2)  
[2025-02-26 02:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:10:22] Production.INFO: ==14648== Releasing lock...  
[2025-02-26 02:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:10:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:11:05
    [end_date_ymd] => 2025-02-26 02:11:05
    [RateCDR] => 1
)
  
[2025-02-26 02:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:11:05' and `end` < '2025-02-26 02:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:11:17] Production.INFO: count ==311  
[2025-02-26 02:11:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:11:05 - End Time 2025-02-26 02:11:05  
[2025-02-26 02:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558624', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558624', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:11:17] Production.INFO: ProcessCDR(1,14558624,1,1,2)  
[2025-02-26 02:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:11:21] Production.INFO: ==14721== Releasing lock...  
[2025-02-26 02:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:11:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 02:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:12:05
    [end_date_ymd] => 2025-02-26 02:12:05
    [RateCDR] => 1
)
  
[2025-02-26 02:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:12:05' and `end` < '2025-02-26 02:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:12:17] Production.INFO: count ==307  
[2025-02-26 02:12:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:12:05 - End Time 2025-02-26 02:12:05  
[2025-02-26 02:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558629', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558629', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558629', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558629', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:12:17] Production.INFO: ProcessCDR(1,14558629,1,1,2)  
[2025-02-26 02:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558629', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558629', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:12:20] Production.INFO: ==14796== Releasing lock...  
[2025-02-26 02:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:12:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:13:05
    [end_date_ymd] => 2025-02-26 02:13:05
    [RateCDR] => 1
)
  
[2025-02-26 02:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:13:05' and `end` < '2025-02-26 02:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:13:16] Production.INFO: count ==306  
[2025-02-26 02:13:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:13:05 - End Time 2025-02-26 02:13:05  
[2025-02-26 02:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558634', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558634', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558634', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558634', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:13:17] Production.INFO: ProcessCDR(1,14558634,1,1,2)  
[2025-02-26 02:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558634', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558634', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:13:20] Production.INFO: ==14870== Releasing lock...  
[2025-02-26 02:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:13:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:14:05
    [end_date_ymd] => 2025-02-26 02:14:05
    [RateCDR] => 1
)
  
[2025-02-26 02:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:14:05' and `end` < '2025-02-26 02:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:14:17] Production.INFO: count ==302  
[2025-02-26 02:14:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:14:05 - End Time 2025-02-26 02:14:05  
[2025-02-26 02:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558639', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558639', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558639', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558639', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:14:17] Production.INFO: ProcessCDR(1,14558639,1,1,2)  
[2025-02-26 02:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558639', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558639', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:14:21] Production.INFO: ==14949== Releasing lock...  
[2025-02-26 02:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:14:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:15:05
    [end_date_ymd] => 2025-02-26 02:15:05
    [RateCDR] => 1
)
  
[2025-02-26 02:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:15:05' and `end` < '2025-02-26 02:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:15:17] Production.INFO: count ==301  
[2025-02-26 02:15:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:15:05 - End Time 2025-02-26 02:15:05  
[2025-02-26 02:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558644', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558644', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558644', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558644', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:15:17] Production.INFO: ProcessCDR(1,14558644,1,1,2)  
[2025-02-26 02:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558644', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558644', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:15:20] Production.INFO: ==15021== Releasing lock...  
[2025-02-26 02:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:15:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:16:05
    [end_date_ymd] => 2025-02-26 02:16:05
    [RateCDR] => 1
)
  
[2025-02-26 02:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:16:05' and `end` < '2025-02-26 02:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:16:17] Production.INFO: count ==297  
[2025-02-26 02:16:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:16:05 - End Time 2025-02-26 02:16:05  
[2025-02-26 02:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558649', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558649', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558649', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558649', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:16:17] Production.INFO: ProcessCDR(1,14558649,1,1,2)  
[2025-02-26 02:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558649', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558649', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:16:20] Production.INFO: ==15102== Releasing lock...  
[2025-02-26 02:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:16:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:17:06
    [end_date_ymd] => 2025-02-26 02:17:06
    [RateCDR] => 1
)
  
[2025-02-26 02:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:17:06' and `end` < '2025-02-26 02:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:17:18] Production.INFO: count ==297  
[2025-02-26 02:17:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:17:06 - End Time 2025-02-26 02:17:06  
[2025-02-26 02:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558654', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558654', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558654', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558654', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:17:18] Production.INFO: ProcessCDR(1,14558654,1,1,2)  
[2025-02-26 02:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558654', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558654', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:17:21] Production.INFO: ==15228== Releasing lock...  
[2025-02-26 02:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:17:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:18:05
    [end_date_ymd] => 2025-02-26 02:18:05
    [RateCDR] => 1
)
  
[2025-02-26 02:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:18:05' and `end` < '2025-02-26 02:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:18:17] Production.INFO: count ==297  
[2025-02-26 02:18:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:18:05 - End Time 2025-02-26 02:18:05  
[2025-02-26 02:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558659', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558659', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558659', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558659', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:18:18] Production.INFO: ProcessCDR(1,14558659,1,1,2)  
[2025-02-26 02:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558659', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558659', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:18:21] Production.INFO: ==15310== Releasing lock...  
[2025-02-26 02:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:18:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:19:06
    [end_date_ymd] => 2025-02-26 02:19:06
    [RateCDR] => 1
)
  
[2025-02-26 02:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:19:06' and `end` < '2025-02-26 02:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:19:18] Production.INFO: count ==297  
[2025-02-26 02:19:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:19:06 - End Time 2025-02-26 02:19:06  
[2025-02-26 02:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558664', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558664', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558664', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558664', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:19:18] Production.INFO: ProcessCDR(1,14558664,1,1,2)  
[2025-02-26 02:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558664', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558664', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:19:21] Production.INFO: ==15391== Releasing lock...  
[2025-02-26 02:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:19:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:20:06
    [end_date_ymd] => 2025-02-26 02:20:06
    [RateCDR] => 1
)
  
[2025-02-26 02:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:20:06' and `end` < '2025-02-26 02:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:20:18] Production.INFO: count ==306  
[2025-02-26 02:20:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:20:06 - End Time 2025-02-26 02:20:06  
[2025-02-26 02:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558670', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558670', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:20:18] Production.INFO: ProcessCDR(1,14558670,1,1,2)  
[2025-02-26 02:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:20:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:20:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:20:23] Production.INFO: ==15473== Releasing lock...  
[2025-02-26 02:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:20:23] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:21:06
    [end_date_ymd] => 2025-02-26 02:21:06
    [RateCDR] => 1
)
  
[2025-02-26 02:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:21:06' and `end` < '2025-02-26 02:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:21:18] Production.INFO: count ==306  
[2025-02-26 02:21:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:21:06 - End Time 2025-02-26 02:21:06  
[2025-02-26 02:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558675', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558675', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:21:18] Production.INFO: ProcessCDR(1,14558675,1,1,2)  
[2025-02-26 02:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:21:21] Production.INFO: ==15556== Releasing lock...  
[2025-02-26 02:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:21:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:22:05
    [end_date_ymd] => 2025-02-26 02:22:05
    [RateCDR] => 1
)
  
[2025-02-26 02:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:22:05' and `end` < '2025-02-26 02:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:22:17] Production.INFO: count ==306  
[2025-02-26 02:22:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:22:05 - End Time 2025-02-26 02:22:05  
[2025-02-26 02:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558680', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558680', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:22:17] Production.INFO: ProcessCDR(1,14558680,1,1,2)  
[2025-02-26 02:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:22:20] Production.INFO: ==15642== Releasing lock...  
[2025-02-26 02:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:22:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:23:05
    [end_date_ymd] => 2025-02-26 02:23:05
    [RateCDR] => 1
)
  
[2025-02-26 02:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:23:05' and `end` < '2025-02-26 02:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:23:17] Production.INFO: count ==309  
[2025-02-26 02:23:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:23:05 - End Time 2025-02-26 02:23:05  
[2025-02-26 02:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558685', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558685', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558685', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558685', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:23:17] Production.INFO: ProcessCDR(1,14558685,1,1,2)  
[2025-02-26 02:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:23:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558685', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558685', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:23:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:23:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:23:20] Production.INFO: ==15740== Releasing lock...  
[2025-02-26 02:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:23:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:24:05
    [end_date_ymd] => 2025-02-26 02:24:05
    [RateCDR] => 1
)
  
[2025-02-26 02:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:24:05' and `end` < '2025-02-26 02:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:24:17] Production.INFO: count ==309  
[2025-02-26 02:24:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:24:05 - End Time 2025-02-26 02:24:05  
[2025-02-26 02:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558690', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558690', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558690', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558690', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:24:17] Production.INFO: ProcessCDR(1,14558690,1,1,2)  
[2025-02-26 02:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558690', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558690', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:24:21] Production.INFO: ==15850== Releasing lock...  
[2025-02-26 02:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:24:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:25:05
    [end_date_ymd] => 2025-02-26 02:25:05
    [RateCDR] => 1
)
  
[2025-02-26 02:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:25:05' and `end` < '2025-02-26 02:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:25:17] Production.INFO: count ==309  
[2025-02-26 02:25:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:25:05 - End Time 2025-02-26 02:25:05  
[2025-02-26 02:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558695', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558695', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558695', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558695', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:25:17] Production.INFO: ProcessCDR(1,14558695,1,1,2)  
[2025-02-26 02:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558695', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558695', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:25:20] Production.INFO: ==15949== Releasing lock...  
[2025-02-26 02:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:25:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:26:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:26:04
    [end_date_ymd] => 2025-02-26 02:26:04
    [RateCDR] => 1
)
  
[2025-02-26 02:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:26:04' and `end` < '2025-02-26 02:26:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:26:16] Production.INFO: count ==305  
[2025-02-26 02:26:16] Production.ERROR: pbx CDR StartTime 2025-02-25 23:26:04 - End Time 2025-02-26 02:26:04  
[2025-02-26 02:26:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558696', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558696', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:26:16] Production.INFO: ProcessCDR(1,14558696,1,1,2)  
[2025-02-26 02:26:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:26:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:26:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:26:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:26:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:26:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:26:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:26:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:26:19] Production.INFO: ==16048== Releasing lock...  
[2025-02-26 02:26:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:26:19] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:27:05
    [end_date_ymd] => 2025-02-26 02:27:05
    [RateCDR] => 1
)
  
[2025-02-26 02:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:27:05' and `end` < '2025-02-26 02:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:27:17] Production.INFO: count ==305  
[2025-02-26 02:27:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:27:05 - End Time 2025-02-26 02:27:05  
[2025-02-26 02:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558705', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558705', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558705', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558705', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:27:17] Production.INFO: ProcessCDR(1,14558705,1,1,2)  
[2025-02-26 02:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558705', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558705', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:27:20] Production.INFO: ==16147== Releasing lock...  
[2025-02-26 02:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:27:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:28:06
    [end_date_ymd] => 2025-02-26 02:28:06
    [RateCDR] => 1
)
  
[2025-02-26 02:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:28:06' and `end` < '2025-02-26 02:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:28:17] Production.INFO: count ==305  
[2025-02-26 02:28:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:28:06 - End Time 2025-02-26 02:28:06  
[2025-02-26 02:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558710', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558710', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558710', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558710', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:28:17] Production.INFO: ProcessCDR(1,14558710,1,1,2)  
[2025-02-26 02:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558710', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558710', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:28:21] Production.INFO: ==16248== Releasing lock...  
[2025-02-26 02:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:28:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:29:06
    [end_date_ymd] => 2025-02-26 02:29:06
    [RateCDR] => 1
)
  
[2025-02-26 02:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:29:06' and `end` < '2025-02-26 02:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:29:17] Production.INFO: count ==305  
[2025-02-26 02:29:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:29:06 - End Time 2025-02-26 02:29:06  
[2025-02-26 02:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558715', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558715', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558715', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558715', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:29:17] Production.INFO: ProcessCDR(1,14558715,1,1,2)  
[2025-02-26 02:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558715', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558715', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:29:21] Production.INFO: ==16344== Releasing lock...  
[2025-02-26 02:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:29:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:30:06
    [end_date_ymd] => 2025-02-26 02:30:06
    [RateCDR] => 1
)
  
[2025-02-26 02:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:30:06' and `end` < '2025-02-26 02:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:30:18] Production.INFO: count ==311  
[2025-02-26 02:30:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:30:06 - End Time 2025-02-26 02:30:06  
[2025-02-26 02:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558721', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558721', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:30:18] Production.INFO: ProcessCDR(1,14558721,1,1,2)  
[2025-02-26 02:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:30:21] Production.INFO: ==16456== Releasing lock...  
[2025-02-26 02:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:30:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:31:05
    [end_date_ymd] => 2025-02-26 02:31:05
    [RateCDR] => 1
)
  
[2025-02-26 02:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:31:05' and `end` < '2025-02-26 02:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:31:17] Production.INFO: count ==312  
[2025-02-26 02:31:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:31:05 - End Time 2025-02-26 02:31:05  
[2025-02-26 02:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558726', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558726', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:31:17] Production.INFO: ProcessCDR(1,14558726,1,1,2)  
[2025-02-26 02:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:31:21] Production.INFO: ==16592== Releasing lock...  
[2025-02-26 02:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:31:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:32:06
    [end_date_ymd] => 2025-02-26 02:32:06
    [RateCDR] => 1
)
  
[2025-02-26 02:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:32:06' and `end` < '2025-02-26 02:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:32:18] Production.INFO: count ==308  
[2025-02-26 02:32:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:32:06 - End Time 2025-02-26 02:32:06  
[2025-02-26 02:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558731', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558731', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558731', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558731', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:32:18] Production.INFO: ProcessCDR(1,14558731,1,1,2)  
[2025-02-26 02:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558731', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558731', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:32:21] Production.INFO: ==16724== Releasing lock...  
[2025-02-26 02:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:32:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:33:05
    [end_date_ymd] => 2025-02-26 02:33:05
    [RateCDR] => 1
)
  
[2025-02-26 02:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:33:05' and `end` < '2025-02-26 02:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:33:17] Production.INFO: count ==308  
[2025-02-26 02:33:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:33:05 - End Time 2025-02-26 02:33:05  
[2025-02-26 02:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558736', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558736', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558736', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558736', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:33:17] Production.INFO: ProcessCDR(1,14558736,1,1,2)  
[2025-02-26 02:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558736', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558736', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:33:20] Production.INFO: ==16813== Releasing lock...  
[2025-02-26 02:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:33:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:34:06
    [end_date_ymd] => 2025-02-26 02:34:06
    [RateCDR] => 1
)
  
[2025-02-26 02:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:34:06' and `end` < '2025-02-26 02:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:34:17] Production.INFO: count ==311  
[2025-02-26 02:34:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:34:06 - End Time 2025-02-26 02:34:06  
[2025-02-26 02:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558741', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558741', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558741', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558741', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:34:17] Production.INFO: ProcessCDR(1,14558741,1,1,2)  
[2025-02-26 02:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558741', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558741', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:34:21] Production.INFO: ==16912== Releasing lock...  
[2025-02-26 02:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:34:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:35:05
    [end_date_ymd] => 2025-02-26 02:35:05
    [RateCDR] => 1
)
  
[2025-02-26 02:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:35:05' and `end` < '2025-02-26 02:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:35:17] Production.INFO: count ==310  
[2025-02-26 02:35:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:35:05 - End Time 2025-02-26 02:35:05  
[2025-02-26 02:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558746', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558746', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558746', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558746', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:35:17] Production.INFO: ProcessCDR(1,14558746,1,1,2)  
[2025-02-26 02:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558746', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558746', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:35:20] Production.INFO: ==17021== Releasing lock...  
[2025-02-26 02:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:35:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 02:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:36:05
    [end_date_ymd] => 2025-02-26 02:36:05
    [RateCDR] => 1
)
  
[2025-02-26 02:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:36:05' and `end` < '2025-02-26 02:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:36:17] Production.INFO: count ==309  
[2025-02-26 02:36:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:36:05 - End Time 2025-02-26 02:36:05  
[2025-02-26 02:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558751', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558751', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558751', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558751', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:36:17] Production.INFO: ProcessCDR(1,14558751,1,1,2)  
[2025-02-26 02:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:36:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558751', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558751', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:36:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:36:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:36:20] Production.INFO: ==17124== Releasing lock...  
[2025-02-26 02:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:36:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:37:05
    [end_date_ymd] => 2025-02-26 02:37:05
    [RateCDR] => 1
)
  
[2025-02-26 02:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:37:05' and `end` < '2025-02-26 02:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:37:16] Production.INFO: count ==309  
[2025-02-26 02:37:16] Production.ERROR: pbx CDR StartTime 2025-02-25 23:37:05 - End Time 2025-02-26 02:37:05  
[2025-02-26 02:37:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:37:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558756', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:37:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558756', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:37:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558756', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:37:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558756', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:37:16] Production.INFO: ProcessCDR(1,14558756,1,1,2)  
[2025-02-26 02:37:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558756', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558756', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:37:20] Production.INFO: ==17222== Releasing lock...  
[2025-02-26 02:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:37:20] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 02:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:38:05
    [end_date_ymd] => 2025-02-26 02:38:05
    [RateCDR] => 1
)
  
[2025-02-26 02:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:38:05' and `end` < '2025-02-26 02:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:38:17] Production.INFO: count ==308  
[2025-02-26 02:38:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:38:05 - End Time 2025-02-26 02:38:05  
[2025-02-26 02:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558761', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558761', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558761', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558761', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:38:17] Production.INFO: ProcessCDR(1,14558761,1,1,2)  
[2025-02-26 02:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558761', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558761', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:38:21] Production.INFO: ==17326== Releasing lock...  
[2025-02-26 02:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:38:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:39:05
    [end_date_ymd] => 2025-02-26 02:39:05
    [RateCDR] => 1
)
  
[2025-02-26 02:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:39:05' and `end` < '2025-02-26 02:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:39:17] Production.INFO: count ==308  
[2025-02-26 02:39:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:39:05 - End Time 2025-02-26 02:39:05  
[2025-02-26 02:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558766', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558766', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558766', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558766', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:39:17] Production.INFO: ProcessCDR(1,14558766,1,1,2)  
[2025-02-26 02:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558766', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558766', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:39:20] Production.INFO: ==17425== Releasing lock...  
[2025-02-26 02:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:39:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:40:05
    [end_date_ymd] => 2025-02-26 02:40:05
    [RateCDR] => 1
)
  
[2025-02-26 02:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:40:05' and `end` < '2025-02-26 02:40:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:40:17] Production.INFO: count ==308  
[2025-02-26 02:40:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:40:05 - End Time 2025-02-26 02:40:05  
[2025-02-26 02:40:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558772', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558772', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:40:17] Production.INFO: ProcessCDR(1,14558772,1,1,2)  
[2025-02-26 02:40:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:40:21] Production.INFO: ==17530== Releasing lock...  
[2025-02-26 02:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:40:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:41:06
    [end_date_ymd] => 2025-02-26 02:41:06
    [RateCDR] => 1
)
  
[2025-02-26 02:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:41:06' and `end` < '2025-02-26 02:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:41:18] Production.INFO: count ==308  
[2025-02-26 02:41:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:41:06 - End Time 2025-02-26 02:41:06  
[2025-02-26 02:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558777', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558777', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:41:18] Production.INFO: ProcessCDR(1,14558777,1,1,2)  
[2025-02-26 02:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:41:21] Production.INFO: ==17636== Releasing lock...  
[2025-02-26 02:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:41:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:42:05
    [end_date_ymd] => 2025-02-26 02:42:05
    [RateCDR] => 1
)
  
[2025-02-26 02:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:42:05' and `end` < '2025-02-26 02:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:42:17] Production.INFO: count ==308  
[2025-02-26 02:42:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:42:05 - End Time 2025-02-26 02:42:05  
[2025-02-26 02:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558782', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558782', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558782', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558782', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:42:17] Production.INFO: ProcessCDR(1,14558782,1,1,2)  
[2025-02-26 02:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558782', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558782', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:42:21] Production.INFO: ==17735== Releasing lock...  
[2025-02-26 02:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:42:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:43:06
    [end_date_ymd] => 2025-02-26 02:43:06
    [RateCDR] => 1
)
  
[2025-02-26 02:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:43:06' and `end` < '2025-02-26 02:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:43:18] Production.INFO: count ==308  
[2025-02-26 02:43:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:43:06 - End Time 2025-02-26 02:43:06  
[2025-02-26 02:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558787', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558787', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558787', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558787', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:43:18] Production.INFO: ProcessCDR(1,14558787,1,1,2)  
[2025-02-26 02:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558787', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558787', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:43:21] Production.INFO: ==17810== Releasing lock...  
[2025-02-26 02:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:43:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:44:05
    [end_date_ymd] => 2025-02-26 02:44:05
    [RateCDR] => 1
)
  
[2025-02-26 02:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:44:05' and `end` < '2025-02-26 02:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:44:17] Production.INFO: count ==308  
[2025-02-26 02:44:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:44:05 - End Time 2025-02-26 02:44:05  
[2025-02-26 02:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558792', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558792', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558792', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558792', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:44:17] Production.INFO: ProcessCDR(1,14558792,1,1,2)  
[2025-02-26 02:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558792', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558792', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:44:20] Production.INFO: ==17884== Releasing lock...  
[2025-02-26 02:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:44:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:45:05
    [end_date_ymd] => 2025-02-26 02:45:05
    [RateCDR] => 1
)
  
[2025-02-26 02:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:45:05' and `end` < '2025-02-26 02:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:45:17] Production.INFO: count ==308  
[2025-02-26 02:45:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:45:05 - End Time 2025-02-26 02:45:05  
[2025-02-26 02:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558797', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558797', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558797', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558797', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:45:17] Production.INFO: ProcessCDR(1,14558797,1,1,2)  
[2025-02-26 02:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558797', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558797', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:45:21] Production.INFO: ==17981== Releasing lock...  
[2025-02-26 02:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:45:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:46:05
    [end_date_ymd] => 2025-02-26 02:46:05
    [RateCDR] => 1
)
  
[2025-02-26 02:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:46:05' and `end` < '2025-02-26 02:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:46:18] Production.INFO: count ==308  
[2025-02-26 02:46:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:46:05 - End Time 2025-02-26 02:46:05  
[2025-02-26 02:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558802', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558802', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558802', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558802', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:46:18] Production.INFO: ProcessCDR(1,14558802,1,1,2)  
[2025-02-26 02:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558802', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558802', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:46:21] Production.INFO: ==18051== Releasing lock...  
[2025-02-26 02:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:46:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:47:06
    [end_date_ymd] => 2025-02-26 02:47:06
    [RateCDR] => 1
)
  
[2025-02-26 02:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:47:06' and `end` < '2025-02-26 02:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:47:17] Production.INFO: count ==308  
[2025-02-26 02:47:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:47:06 - End Time 2025-02-26 02:47:06  
[2025-02-26 02:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558807', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558807', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558807', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558807', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:47:18] Production.INFO: ProcessCDR(1,14558807,1,1,2)  
[2025-02-26 02:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558807', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558807', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:47:21] Production.INFO: ==18128== Releasing lock...  
[2025-02-26 02:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:47:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:48:05
    [end_date_ymd] => 2025-02-26 02:48:05
    [RateCDR] => 1
)
  
[2025-02-26 02:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:48:05' and `end` < '2025-02-26 02:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:48:17] Production.INFO: count ==308  
[2025-02-26 02:48:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:48:05 - End Time 2025-02-26 02:48:05  
[2025-02-26 02:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558812', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558812', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558812', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558812', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:48:17] Production.INFO: ProcessCDR(1,14558812,1,1,2)  
[2025-02-26 02:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558812', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558812', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:48:20] Production.INFO: ==18262== Releasing lock...  
[2025-02-26 02:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:48:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:49:05
    [end_date_ymd] => 2025-02-26 02:49:05
    [RateCDR] => 1
)
  
[2025-02-26 02:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:49:05' and `end` < '2025-02-26 02:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:49:17] Production.INFO: count ==308  
[2025-02-26 02:49:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:49:05 - End Time 2025-02-26 02:49:05  
[2025-02-26 02:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558817', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558817', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558817', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558817', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:49:17] Production.INFO: ProcessCDR(1,14558817,1,1,2)  
[2025-02-26 02:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558817', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558817', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:49:20] Production.INFO: ==18346== Releasing lock...  
[2025-02-26 02:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:49:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:50:06
    [end_date_ymd] => 2025-02-26 02:50:06
    [RateCDR] => 1
)
  
[2025-02-26 02:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:50:06' and `end` < '2025-02-26 02:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:50:18] Production.INFO: count ==307  
[2025-02-26 02:50:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:50:06 - End Time 2025-02-26 02:50:06  
[2025-02-26 02:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558823', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558823', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:50:18] Production.INFO: ProcessCDR(1,14558823,1,1,2)  
[2025-02-26 02:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:50:21] Production.INFO: ==18420== Releasing lock...  
[2025-02-26 02:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:50:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:51:05
    [end_date_ymd] => 2025-02-26 02:51:05
    [RateCDR] => 1
)
  
[2025-02-26 02:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:51:05' and `end` < '2025-02-26 02:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:51:17] Production.INFO: count ==307  
[2025-02-26 02:51:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:51:05 - End Time 2025-02-26 02:51:05  
[2025-02-26 02:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558828', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558828', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:51:17] Production.INFO: ProcessCDR(1,14558828,1,1,2)  
[2025-02-26 02:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:51:20] Production.INFO: ==18501== Releasing lock...  
[2025-02-26 02:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:51:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:52:05
    [end_date_ymd] => 2025-02-26 02:52:05
    [RateCDR] => 1
)
  
[2025-02-26 02:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:52:05' and `end` < '2025-02-26 02:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:52:17] Production.INFO: count ==307  
[2025-02-26 02:52:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:52:05 - End Time 2025-02-26 02:52:05  
[2025-02-26 02:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558833', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558833', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558833', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558833', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:52:17] Production.INFO: ProcessCDR(1,14558833,1,1,2)  
[2025-02-26 02:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:52:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558833', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558833', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:52:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:52:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:52:20] Production.INFO: ==18574== Releasing lock...  
[2025-02-26 02:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:52:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:53:06
    [end_date_ymd] => 2025-02-26 02:53:06
    [RateCDR] => 1
)
  
[2025-02-26 02:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:53:06' and `end` < '2025-02-26 02:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:53:17] Production.INFO: count ==307  
[2025-02-26 02:53:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:53:06 - End Time 2025-02-26 02:53:06  
[2025-02-26 02:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558838', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558838', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558838', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558838', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:53:18] Production.INFO: ProcessCDR(1,14558838,1,1,2)  
[2025-02-26 02:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558838', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558838', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:53:21] Production.INFO: ==18644== Releasing lock...  
[2025-02-26 02:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:53:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:54:05
    [end_date_ymd] => 2025-02-26 02:54:05
    [RateCDR] => 1
)
  
[2025-02-26 02:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:54:05' and `end` < '2025-02-26 02:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:54:16] Production.INFO: count ==307  
[2025-02-26 02:54:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:54:05 - End Time 2025-02-26 02:54:05  
[2025-02-26 02:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558843', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558843', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558843', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558843', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:54:17] Production.INFO: ProcessCDR(1,14558843,1,1,2)  
[2025-02-26 02:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:54:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558843', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558843', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:54:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:54:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:54:20] Production.INFO: ==18715== Releasing lock...  
[2025-02-26 02:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:54:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:55:05
    [end_date_ymd] => 2025-02-26 02:55:05
    [RateCDR] => 1
)
  
[2025-02-26 02:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:55:05' and `end` < '2025-02-26 02:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:55:17] Production.INFO: count ==307  
[2025-02-26 02:55:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:55:05 - End Time 2025-02-26 02:55:05  
[2025-02-26 02:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558848', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558848', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558848', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558848', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:55:17] Production.INFO: ProcessCDR(1,14558848,1,1,2)  
[2025-02-26 02:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558848', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558848', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:55:20] Production.INFO: ==18802== Releasing lock...  
[2025-02-26 02:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:55:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:56:05
    [end_date_ymd] => 2025-02-26 02:56:05
    [RateCDR] => 1
)
  
[2025-02-26 02:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:56:05' and `end` < '2025-02-26 02:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:56:17] Production.INFO: count ==307  
[2025-02-26 02:56:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:56:05 - End Time 2025-02-26 02:56:05  
[2025-02-26 02:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558853', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558853', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558853', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558853', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:56:17] Production.INFO: ProcessCDR(1,14558853,1,1,2)  
[2025-02-26 02:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:56:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558853', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558853', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:56:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:56:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:56:20] Production.INFO: ==18887== Releasing lock...  
[2025-02-26 02:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:56:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:57:06
    [end_date_ymd] => 2025-02-26 02:57:06
    [RateCDR] => 1
)
  
[2025-02-26 02:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:57:06' and `end` < '2025-02-26 02:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:57:18] Production.INFO: count ==305  
[2025-02-26 02:57:18] Production.ERROR: pbx CDR StartTime 2025-02-25 23:57:06 - End Time 2025-02-26 02:57:06  
[2025-02-26 02:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558858', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558858', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558858', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558858', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:57:18] Production.INFO: ProcessCDR(1,14558858,1,1,2)  
[2025-02-26 02:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558858', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558858', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:57:21] Production.INFO: ==18971== Releasing lock...  
[2025-02-26 02:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:57:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 02:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:58:05
    [end_date_ymd] => 2025-02-26 02:58:05
    [RateCDR] => 1
)
  
[2025-02-26 02:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:58:05' and `end` < '2025-02-26 02:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:58:17] Production.INFO: count ==304  
[2025-02-26 02:58:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:58:05 - End Time 2025-02-26 02:58:05  
[2025-02-26 02:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558863', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558863', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558863', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558863', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:58:17] Production.INFO: ProcessCDR(1,14558863,1,1,2)  
[2025-02-26 02:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:58:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:58:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:58:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:58:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558863', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:58:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558863', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:58:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:58:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:58:20] Production.INFO: ==19043== Releasing lock...  
[2025-02-26 02:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:58:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 02:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-25 23:59:05
    [end_date_ymd] => 2025-02-26 02:59:05
    [RateCDR] => 1
)
  
[2025-02-26 02:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-25 23:59:05' and `end` < '2025-02-26 02:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 02:59:17] Production.INFO: count ==304  
[2025-02-26 02:59:17] Production.ERROR: pbx CDR StartTime 2025-02-25 23:59:05 - End Time 2025-02-26 02:59:05  
[2025-02-26 02:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 02:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558868', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558868', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558868', 'tblTempVendorCDR_20' ) start  
[2025-02-26 02:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558868', 'tblTempVendorCDR_20' ) end  
[2025-02-26 02:59:17] Production.INFO: ProcessCDR(1,14558868,1,1,2)  
[2025-02-26 02:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 02:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 02:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558868', 'tblTempUsageDetail_20' ) start  
[2025-02-26 02:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558868', 'tblTempUsageDetail_20' ) end  
[2025-02-26 02:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 02:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 02:59:20] Production.INFO: ==19120== Releasing lock...  
[2025-02-26 02:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 02:59:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 03:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:00:06
    [end_date_ymd] => 2025-02-26 03:00:06
    [RateCDR] => 1
)
  
[2025-02-26 03:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:00:06' and `end` < '2025-02-26 03:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:00:18] Production.INFO: count ==300  
[2025-02-26 03:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:00:06 - End Time 2025-02-26 03:00:06  
[2025-02-26 03:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558874', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558874', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:00:18] Production.INFO: ProcessCDR(1,14558874,1,1,2)  
[2025-02-26 03:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:00:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:00:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:00:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:00:21] Production.INFO: ==19194== Releasing lock...  
[2025-02-26 03:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:00:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 03:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:01:05
    [end_date_ymd] => 2025-02-26 03:01:05
    [RateCDR] => 1
)
  
[2025-02-26 03:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:01:05' and `end` < '2025-02-26 03:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:01:17] Production.INFO: count ==304  
[2025-02-26 03:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:01:05 - End Time 2025-02-26 03:01:05  
[2025-02-26 03:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558879', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558879', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:01:17] Production.INFO: ProcessCDR(1,14558879,1,1,2)  
[2025-02-26 03:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:01:21] Production.INFO: ==19282== Releasing lock...  
[2025-02-26 03:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:01:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 03:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:02:06
    [end_date_ymd] => 2025-02-26 03:02:06
    [RateCDR] => 1
)
  
[2025-02-26 03:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:02:06' and `end` < '2025-02-26 03:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:02:18] Production.INFO: count ==304  
[2025-02-26 03:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:02:06 - End Time 2025-02-26 03:02:06  
[2025-02-26 03:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558884', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558884', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558884', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558884', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:02:18] Production.INFO: ProcessCDR(1,14558884,1,1,2)  
[2025-02-26 03:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:02:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:02:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558884', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558884', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:02:22] Production.INFO: ==19430== Releasing lock...  
[2025-02-26 03:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:02:22] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 03:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:03:05
    [end_date_ymd] => 2025-02-26 03:03:05
    [RateCDR] => 1
)
  
[2025-02-26 03:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:03:05' and `end` < '2025-02-26 03:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:03:17] Production.INFO: count ==304  
[2025-02-26 03:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:03:05 - End Time 2025-02-26 03:03:05  
[2025-02-26 03:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558885', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558885', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:03:17] Production.INFO: ProcessCDR(1,14558885,1,1,2)  
[2025-02-26 03:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:03:20] Production.INFO: ==19542== Releasing lock...  
[2025-02-26 03:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:03:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 03:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:04:05
    [end_date_ymd] => 2025-02-26 03:04:05
    [RateCDR] => 1
)
  
[2025-02-26 03:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:04:05' and `end` < '2025-02-26 03:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:04:17] Production.INFO: count ==303  
[2025-02-26 03:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:04:05 - End Time 2025-02-26 03:04:05  
[2025-02-26 03:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558894', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558894', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558894', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558894', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:04:17] Production.INFO: ProcessCDR(1,14558894,1,1,2)  
[2025-02-26 03:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558894', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558894', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:04:21] Production.INFO: ==19612== Releasing lock...  
[2025-02-26 03:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:04:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:05:05
    [end_date_ymd] => 2025-02-26 03:05:05
    [RateCDR] => 1
)
  
[2025-02-26 03:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:05:05' and `end` < '2025-02-26 03:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:05:17] Production.INFO: count ==303  
[2025-02-26 03:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:05:05 - End Time 2025-02-26 03:05:05  
[2025-02-26 03:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558899', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558899', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558899', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558899', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:05:17] Production.INFO: ProcessCDR(1,14558899,1,1,2)  
[2025-02-26 03:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558899', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558899', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:05:20] Production.INFO: ==19680== Releasing lock...  
[2025-02-26 03:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:05:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:06:05
    [end_date_ymd] => 2025-02-26 03:06:05
    [RateCDR] => 1
)
  
[2025-02-26 03:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:06:05' and `end` < '2025-02-26 03:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:06:17] Production.INFO: count ==300  
[2025-02-26 03:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:06:05 - End Time 2025-02-26 03:06:05  
[2025-02-26 03:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558904', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558904', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558904', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558904', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:06:17] Production.INFO: ProcessCDR(1,14558904,1,1,2)  
[2025-02-26 03:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:06:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558904', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558904', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:06:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:06:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:06:20] Production.INFO: ==19836== Releasing lock...  
[2025-02-26 03:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:06:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:07:05
    [end_date_ymd] => 2025-02-26 03:07:05
    [RateCDR] => 1
)
  
[2025-02-26 03:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:07:05' and `end` < '2025-02-26 03:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:07:17] Production.INFO: count ==300  
[2025-02-26 03:07:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:07:05 - End Time 2025-02-26 03:07:05  
[2025-02-26 03:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558909', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558909', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558909', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558909', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:07:17] Production.INFO: ProcessCDR(1,14558909,1,1,2)  
[2025-02-26 03:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558909', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558909', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:07:21] Production.INFO: ==19906== Releasing lock...  
[2025-02-26 03:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:07:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:08:06
    [end_date_ymd] => 2025-02-26 03:08:06
    [RateCDR] => 1
)
  
[2025-02-26 03:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:08:06' and `end` < '2025-02-26 03:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:08:17] Production.INFO: count ==299  
[2025-02-26 03:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:08:06 - End Time 2025-02-26 03:08:06  
[2025-02-26 03:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558914', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558914', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558914', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558914', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:08:18] Production.INFO: ProcessCDR(1,14558914,1,1,2)  
[2025-02-26 03:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558914', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558914', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:08:21] Production.INFO: ==19993== Releasing lock...  
[2025-02-26 03:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:08:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:09:05
    [end_date_ymd] => 2025-02-26 03:09:05
    [RateCDR] => 1
)
  
[2025-02-26 03:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:09:05' and `end` < '2025-02-26 03:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:09:17] Production.INFO: count ==296  
[2025-02-26 03:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:09:05 - End Time 2025-02-26 03:09:05  
[2025-02-26 03:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558919', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558919', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558919', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558919', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:09:17] Production.INFO: ProcessCDR(1,14558919,1,1,2)  
[2025-02-26 03:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558919', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558919', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:09:20] Production.INFO: ==20162== Releasing lock...  
[2025-02-26 03:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:09:20] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 03:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:10:06
    [end_date_ymd] => 2025-02-26 03:10:06
    [RateCDR] => 1
)
  
[2025-02-26 03:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:10:06' and `end` < '2025-02-26 03:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:10:18] Production.INFO: count ==290  
[2025-02-26 03:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:10:06 - End Time 2025-02-26 03:10:06  
[2025-02-26 03:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558925', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558925', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:10:18] Production.INFO: ProcessCDR(1,14558925,1,1,2)  
[2025-02-26 03:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:10:21] Production.INFO: ==20232== Releasing lock...  
[2025-02-26 03:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:10:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:11:05
    [end_date_ymd] => 2025-02-26 03:11:05
    [RateCDR] => 1
)
  
[2025-02-26 03:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:11:05' and `end` < '2025-02-26 03:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:11:17] Production.INFO: count ==267  
[2025-02-26 03:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:11:05 - End Time 2025-02-26 03:11:05  
[2025-02-26 03:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558930', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558930', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:11:17] Production.INFO: ProcessCDR(1,14558930,1,1,2)  
[2025-02-26 03:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:11:20] Production.INFO: ==20316== Releasing lock...  
[2025-02-26 03:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:11:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:12:05
    [end_date_ymd] => 2025-02-26 03:12:05
    [RateCDR] => 1
)
  
[2025-02-26 03:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:12:05' and `end` < '2025-02-26 03:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:12:17] Production.INFO: count ==266  
[2025-02-26 03:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:12:05 - End Time 2025-02-26 03:12:05  
[2025-02-26 03:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558935', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558935', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558935', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558935', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:12:17] Production.INFO: ProcessCDR(1,14558935,1,1,2)  
[2025-02-26 03:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558935', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558935', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:12:20] Production.INFO: ==20391== Releasing lock...  
[2025-02-26 03:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:12:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:13:05
    [end_date_ymd] => 2025-02-26 03:13:05
    [RateCDR] => 1
)
  
[2025-02-26 03:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:13:05' and `end` < '2025-02-26 03:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:13:17] Production.INFO: count ==266  
[2025-02-26 03:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:13:05 - End Time 2025-02-26 03:13:05  
[2025-02-26 03:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558940', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558940', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558940', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558940', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:13:17] Production.INFO: ProcessCDR(1,14558940,1,1,2)  
[2025-02-26 03:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558940', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558940', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:13:20] Production.INFO: ==20544== Releasing lock...  
[2025-02-26 03:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:13:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:14:05
    [end_date_ymd] => 2025-02-26 03:14:05
    [RateCDR] => 1
)
  
[2025-02-26 03:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:14:05' and `end` < '2025-02-26 03:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:14:17] Production.INFO: count ==258  
[2025-02-26 03:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:14:05 - End Time 2025-02-26 03:14:05  
[2025-02-26 03:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558945', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558945', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558945', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558945', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:14:17] Production.INFO: ProcessCDR(1,14558945,1,1,2)  
[2025-02-26 03:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:14:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558945', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558945', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:14:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:14:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:14:20] Production.INFO: ==20625== Releasing lock...  
[2025-02-26 03:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:14:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 03:15:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:15:04
    [end_date_ymd] => 2025-02-26 03:15:04
    [RateCDR] => 1
)
  
[2025-02-26 03:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:15:04' and `end` < '2025-02-26 03:15:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:15:16] Production.INFO: count ==253  
[2025-02-26 03:15:16] Production.ERROR: pbx CDR StartTime 2025-02-26 00:15:04 - End Time 2025-02-26 03:15:04  
[2025-02-26 03:15:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:15:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558950', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:15:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558950', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:15:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558950', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:15:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558950', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:15:16] Production.INFO: ProcessCDR(1,14558950,1,1,2)  
[2025-02-26 03:15:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:15:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:15:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:15:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:15:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558950', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:15:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558950', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:15:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:15:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:15:19] Production.INFO: ==20700== Releasing lock...  
[2025-02-26 03:15:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:15:19] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:16:06
    [end_date_ymd] => 2025-02-26 03:16:06
    [RateCDR] => 1
)
  
[2025-02-26 03:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:16:06' and `end` < '2025-02-26 03:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:16:17] Production.INFO: count ==253  
[2025-02-26 03:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:16:06 - End Time 2025-02-26 03:16:06  
[2025-02-26 03:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558955', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558955', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558955', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558955', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:16:17] Production.INFO: ProcessCDR(1,14558955,1,1,2)  
[2025-02-26 03:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558955', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558955', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:16:21] Production.INFO: ==20775== Releasing lock...  
[2025-02-26 03:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:16:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 03:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:17:05
    [end_date_ymd] => 2025-02-26 03:17:05
    [RateCDR] => 1
)
  
[2025-02-26 03:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:17:05' and `end` < '2025-02-26 03:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:17:16] Production.INFO: count ==248  
[2025-02-26 03:17:16] Production.ERROR: pbx CDR StartTime 2025-02-26 00:17:05 - End Time 2025-02-26 03:17:05  
[2025-02-26 03:17:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558960', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558960', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558960', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558960', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:17:16] Production.INFO: ProcessCDR(1,14558960,1,1,2)  
[2025-02-26 03:17:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:17:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:17:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:17:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:17:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558960', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:17:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558960', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:17:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:17:20] Production.INFO: ==20924== Releasing lock...  
[2025-02-26 03:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:17:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 03:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:18:05
    [end_date_ymd] => 2025-02-26 03:18:05
    [RateCDR] => 1
)
  
[2025-02-26 03:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:18:05' and `end` < '2025-02-26 03:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:18:17] Production.INFO: count ==245  
[2025-02-26 03:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:18:05 - End Time 2025-02-26 03:18:05  
[2025-02-26 03:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558965', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558965', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558965', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558965', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:18:17] Production.INFO: ProcessCDR(1,14558965,1,1,2)  
[2025-02-26 03:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558965', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558965', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:18:20] Production.INFO: ==21007== Releasing lock...  
[2025-02-26 03:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:18:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 03:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:19:06
    [end_date_ymd] => 2025-02-26 03:19:06
    [RateCDR] => 1
)
  
[2025-02-26 03:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:19:06' and `end` < '2025-02-26 03:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:19:17] Production.INFO: count ==241  
[2025-02-26 03:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:19:06 - End Time 2025-02-26 03:19:06  
[2025-02-26 03:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558970', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558970', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558970', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558970', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:19:17] Production.INFO: ProcessCDR(1,14558970,1,1,2)  
[2025-02-26 03:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558970', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558970', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:19:21] Production.INFO: ==21083== Releasing lock...  
[2025-02-26 03:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:19:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:20:06
    [end_date_ymd] => 2025-02-26 03:20:06
    [RateCDR] => 1
)
  
[2025-02-26 03:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:20:06' and `end` < '2025-02-26 03:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:20:18] Production.INFO: count ==239  
[2025-02-26 03:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:20:06 - End Time 2025-02-26 03:20:06  
[2025-02-26 03:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558975', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558975', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558975', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558975', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:20:18] Production.INFO: ProcessCDR(1,14558975,1,1,2)  
[2025-02-26 03:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558975', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558975', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:20:21] Production.INFO: ==21196== Releasing lock...  
[2025-02-26 03:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:20:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 03:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:21:06
    [end_date_ymd] => 2025-02-26 03:21:06
    [RateCDR] => 1
)
  
[2025-02-26 03:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:21:06' and `end` < '2025-02-26 03:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:21:18] Production.INFO: count ==231  
[2025-02-26 03:21:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:21:06 - End Time 2025-02-26 03:21:06  
[2025-02-26 03:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558981', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558981', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:21:18] Production.INFO: ProcessCDR(1,14558981,1,1,2)  
[2025-02-26 03:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:21:21] Production.INFO: ==21272== Releasing lock...  
[2025-02-26 03:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:21:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:22:06
    [end_date_ymd] => 2025-02-26 03:22:06
    [RateCDR] => 1
)
  
[2025-02-26 03:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:22:06' and `end` < '2025-02-26 03:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:22:18] Production.INFO: count ==231  
[2025-02-26 03:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:22:06 - End Time 2025-02-26 03:22:06  
[2025-02-26 03:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558986', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558986', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:22:18] Production.INFO: ProcessCDR(1,14558986,1,1,2)  
[2025-02-26 03:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:22:21] Production.INFO: ==21351== Releasing lock...  
[2025-02-26 03:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:22:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:23:05
    [end_date_ymd] => 2025-02-26 03:23:05
    [RateCDR] => 1
)
  
[2025-02-26 03:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:23:05' and `end` < '2025-02-26 03:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:23:16] Production.INFO: count ==231  
[2025-02-26 03:23:16] Production.ERROR: pbx CDR StartTime 2025-02-26 00:23:05 - End Time 2025-02-26 03:23:05  
[2025-02-26 03:23:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558991', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:23:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558991', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:23:16] Production.INFO: ProcessCDR(1,14558991,1,1,2)  
[2025-02-26 03:23:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:23:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:23:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:23:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:23:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:23:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:23:20] Production.INFO: ==21423== Releasing lock...  
[2025-02-26 03:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:23:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:24:05
    [end_date_ymd] => 2025-02-26 03:24:05
    [RateCDR] => 1
)
  
[2025-02-26 03:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:24:05' and `end` < '2025-02-26 03:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:24:17] Production.INFO: count ==231  
[2025-02-26 03:24:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:24:05 - End Time 2025-02-26 03:24:05  
[2025-02-26 03:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14558996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558996', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14558996', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:24:17] Production.INFO: ProcessCDR(1,14558996,1,1,2)  
[2025-02-26 03:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14558996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14558996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14558996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14558996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14558996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:24:21] Production.INFO: ==21498== Releasing lock...  
[2025-02-26 03:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:24:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:25:05
    [end_date_ymd] => 2025-02-26 03:25:05
    [RateCDR] => 1
)
  
[2025-02-26 03:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:25:05' and `end` < '2025-02-26 03:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:25:17] Production.INFO: count ==228  
[2025-02-26 03:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:25:05 - End Time 2025-02-26 03:25:05  
[2025-02-26 03:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559001', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559001', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:25:17] Production.INFO: ProcessCDR(1,14559001,1,1,2)  
[2025-02-26 03:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:25:20] Production.INFO: ==21568== Releasing lock...  
[2025-02-26 03:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:25:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 03:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:26:05
    [end_date_ymd] => 2025-02-26 03:26:05
    [RateCDR] => 1
)
  
[2025-02-26 03:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:26:05' and `end` < '2025-02-26 03:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:26:17] Production.INFO: count ==227  
[2025-02-26 03:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:26:05 - End Time 2025-02-26 03:26:05  
[2025-02-26 03:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559006', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559006', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559006', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559006', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:26:17] Production.INFO: ProcessCDR(1,14559006,1,1,2)  
[2025-02-26 03:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:26:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559006', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559006', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:26:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:26:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:26:20] Production.INFO: ==21644== Releasing lock...  
[2025-02-26 03:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:26:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:27:05
    [end_date_ymd] => 2025-02-26 03:27:05
    [RateCDR] => 1
)
  
[2025-02-26 03:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:27:05' and `end` < '2025-02-26 03:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:27:17] Production.INFO: count ==223  
[2025-02-26 03:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:27:05 - End Time 2025-02-26 03:27:05  
[2025-02-26 03:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559011', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559011', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559011', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559011', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:27:17] Production.INFO: ProcessCDR(1,14559011,1,1,2)  
[2025-02-26 03:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559011', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559011', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:27:20] Production.INFO: ==21731== Releasing lock...  
[2025-02-26 03:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:27:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:28:05
    [end_date_ymd] => 2025-02-26 03:28:05
    [RateCDR] => 1
)
  
[2025-02-26 03:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:28:05' and `end` < '2025-02-26 03:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:28:17] Production.INFO: count ==222  
[2025-02-26 03:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:28:05 - End Time 2025-02-26 03:28:05  
[2025-02-26 03:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559016', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559016', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559016', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559016', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:28:17] Production.INFO: ProcessCDR(1,14559016,1,1,2)  
[2025-02-26 03:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559016', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559016', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:28:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:28:20] Production.INFO: ==21805== Releasing lock...  
[2025-02-26 03:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:28:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:29:06
    [end_date_ymd] => 2025-02-26 03:29:06
    [RateCDR] => 1
)
  
[2025-02-26 03:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:29:06' and `end` < '2025-02-26 03:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:29:18] Production.INFO: count ==218  
[2025-02-26 03:29:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:29:06 - End Time 2025-02-26 03:29:06  
[2025-02-26 03:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559021', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559021', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559021', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559021', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:29:18] Production.INFO: ProcessCDR(1,14559021,1,1,2)  
[2025-02-26 03:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559021', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559021', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:29:21] Production.INFO: ==21886== Releasing lock...  
[2025-02-26 03:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:29:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:30:06
    [end_date_ymd] => 2025-02-26 03:30:06
    [RateCDR] => 1
)
  
[2025-02-26 03:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:30:06' and `end` < '2025-02-26 03:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:30:18] Production.INFO: count ==206  
[2025-02-26 03:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:30:06 - End Time 2025-02-26 03:30:06  
[2025-02-26 03:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559026', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559026', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559026', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559026', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:30:18] Production.INFO: ProcessCDR(1,14559026,1,1,2)  
[2025-02-26 03:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559026', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559026', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:30:21] Production.INFO: ==21972== Releasing lock...  
[2025-02-26 03:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:30:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 03:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:31:05
    [end_date_ymd] => 2025-02-26 03:31:05
    [RateCDR] => 1
)
  
[2025-02-26 03:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:31:05' and `end` < '2025-02-26 03:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:31:17] Production.INFO: count ==180  
[2025-02-26 03:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:31:05 - End Time 2025-02-26 03:31:05  
[2025-02-26 03:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559032', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559032', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:31:17] Production.INFO: ProcessCDR(1,14559032,1,1,2)  
[2025-02-26 03:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:31:21] Production.INFO: ==22051== Releasing lock...  
[2025-02-26 03:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:31:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:32:05
    [end_date_ymd] => 2025-02-26 03:32:05
    [RateCDR] => 1
)
  
[2025-02-26 03:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:32:05' and `end` < '2025-02-26 03:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:32:17] Production.INFO: count ==176  
[2025-02-26 03:32:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:32:05 - End Time 2025-02-26 03:32:05  
[2025-02-26 03:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559037', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559037', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:32:17] Production.INFO: ProcessCDR(1,14559037,1,1,2)  
[2025-02-26 03:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:32:21] Production.INFO: ==22129== Releasing lock...  
[2025-02-26 03:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:32:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:33:06
    [end_date_ymd] => 2025-02-26 03:33:06
    [RateCDR] => 1
)
  
[2025-02-26 03:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:33:06' and `end` < '2025-02-26 03:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:33:18] Production.INFO: count ==176  
[2025-02-26 03:33:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:33:06 - End Time 2025-02-26 03:33:06  
[2025-02-26 03:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559042', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559042', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:33:18] Production.INFO: ProcessCDR(1,14559042,1,1,2)  
[2025-02-26 03:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:33:21] Production.INFO: ==22225== Releasing lock...  
[2025-02-26 03:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:33:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:34:05
    [end_date_ymd] => 2025-02-26 03:34:05
    [RateCDR] => 1
)
  
[2025-02-26 03:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:34:05' and `end` < '2025-02-26 03:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:34:17] Production.INFO: count ==176  
[2025-02-26 03:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:34:05 - End Time 2025-02-26 03:34:05  
[2025-02-26 03:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559047', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559047', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:34:17] Production.INFO: ProcessCDR(1,14559047,1,1,2)  
[2025-02-26 03:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:34:21] Production.INFO: ==22299== Releasing lock...  
[2025-02-26 03:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:34:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:35:06
    [end_date_ymd] => 2025-02-26 03:35:06
    [RateCDR] => 1
)
  
[2025-02-26 03:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:35:06' and `end` < '2025-02-26 03:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:35:18] Production.INFO: count ==176  
[2025-02-26 03:35:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:35:06 - End Time 2025-02-26 03:35:06  
[2025-02-26 03:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559052', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559052', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:35:18] Production.INFO: ProcessCDR(1,14559052,1,1,2)  
[2025-02-26 03:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:35:21] Production.INFO: ==22370== Releasing lock...  
[2025-02-26 03:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:35:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:36:05
    [end_date_ymd] => 2025-02-26 03:36:05
    [RateCDR] => 1
)
  
[2025-02-26 03:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:36:05' and `end` < '2025-02-26 03:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:36:17] Production.INFO: count ==176  
[2025-02-26 03:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:36:05 - End Time 2025-02-26 03:36:05  
[2025-02-26 03:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559057', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559057', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559057', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559057', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:36:17] Production.INFO: ProcessCDR(1,14559057,1,1,2)  
[2025-02-26 03:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559057', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559057', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:36:21] Production.INFO: ==22482== Releasing lock...  
[2025-02-26 03:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:36:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:37:06
    [end_date_ymd] => 2025-02-26 03:37:06
    [RateCDR] => 1
)
  
[2025-02-26 03:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:37:06' and `end` < '2025-02-26 03:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:37:18] Production.INFO: count ==176  
[2025-02-26 03:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:37:06 - End Time 2025-02-26 03:37:06  
[2025-02-26 03:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559061', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559061', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:37:18] Production.INFO: ProcessCDR(1,14559061,1,1,2)  
[2025-02-26 03:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:37:22] Production.INFO: ==22552== Releasing lock...  
[2025-02-26 03:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:37:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:38:05
    [end_date_ymd] => 2025-02-26 03:38:05
    [RateCDR] => 1
)
  
[2025-02-26 03:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:38:05' and `end` < '2025-02-26 03:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:38:17] Production.INFO: count ==173  
[2025-02-26 03:38:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:38:05 - End Time 2025-02-26 03:38:05  
[2025-02-26 03:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559067', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559067', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559067', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559067', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:38:17] Production.INFO: ProcessCDR(1,14559067,1,1,2)  
[2025-02-26 03:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559067', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559067', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:38:21] Production.INFO: ==22626== Releasing lock...  
[2025-02-26 03:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:38:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:39:06
    [end_date_ymd] => 2025-02-26 03:39:06
    [RateCDR] => 1
)
  
[2025-02-26 03:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:39:06' and `end` < '2025-02-26 03:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:39:18] Production.INFO: count ==173  
[2025-02-26 03:39:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:39:06 - End Time 2025-02-26 03:39:06  
[2025-02-26 03:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559072', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559072', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559072', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559072', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:39:18] Production.INFO: ProcessCDR(1,14559072,1,1,2)  
[2025-02-26 03:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559072', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559072', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:39:22] Production.INFO: ==22707== Releasing lock...  
[2025-02-26 03:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:39:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:40:06
    [end_date_ymd] => 2025-02-26 03:40:06
    [RateCDR] => 1
)
  
[2025-02-26 03:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:40:06' and `end` < '2025-02-26 03:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:40:18] Production.INFO: count ==169  
[2025-02-26 03:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:40:06 - End Time 2025-02-26 03:40:06  
[2025-02-26 03:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559078', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559078', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:40:18] Production.INFO: ProcessCDR(1,14559078,1,1,2)  
[2025-02-26 03:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:40:22] Production.INFO: ==22782== Releasing lock...  
[2025-02-26 03:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:40:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:41:05
    [end_date_ymd] => 2025-02-26 03:41:05
    [RateCDR] => 1
)
  
[2025-02-26 03:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:41:05' and `end` < '2025-02-26 03:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:41:17] Production.INFO: count ==164  
[2025-02-26 03:41:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:41:05 - End Time 2025-02-26 03:41:05  
[2025-02-26 03:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559083', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559083', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:41:17] Production.INFO: ProcessCDR(1,14559083,1,1,2)  
[2025-02-26 03:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:41:21] Production.INFO: ==22857== Releasing lock...  
[2025-02-26 03:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:41:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:42:05
    [end_date_ymd] => 2025-02-26 03:42:05
    [RateCDR] => 1
)
  
[2025-02-26 03:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:42:05' and `end` < '2025-02-26 03:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:42:17] Production.INFO: count ==166  
[2025-02-26 03:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:42:05 - End Time 2025-02-26 03:42:05  
[2025-02-26 03:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559088', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559088', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:42:17] Production.INFO: ProcessCDR(1,14559088,1,1,2)  
[2025-02-26 03:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:42:21] Production.INFO: ==22929== Releasing lock...  
[2025-02-26 03:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:42:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:43:05
    [end_date_ymd] => 2025-02-26 03:43:05
    [RateCDR] => 1
)
  
[2025-02-26 03:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:43:05' and `end` < '2025-02-26 03:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:43:17] Production.INFO: count ==165  
[2025-02-26 03:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:43:05 - End Time 2025-02-26 03:43:05  
[2025-02-26 03:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559093', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559093', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:43:17] Production.INFO: ProcessCDR(1,14559093,1,1,2)  
[2025-02-26 03:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:43:21] Production.INFO: ==23003== Releasing lock...  
[2025-02-26 03:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:43:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:44:06
    [end_date_ymd] => 2025-02-26 03:44:06
    [RateCDR] => 1
)
  
[2025-02-26 03:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:44:06' and `end` < '2025-02-26 03:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:44:18] Production.INFO: count ==165  
[2025-02-26 03:44:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:44:06 - End Time 2025-02-26 03:44:06  
[2025-02-26 03:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559098', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559098', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:44:18] Production.INFO: ProcessCDR(1,14559098,1,1,2)  
[2025-02-26 03:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:44:22] Production.INFO: ==23084== Releasing lock...  
[2025-02-26 03:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:44:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:45:06
    [end_date_ymd] => 2025-02-26 03:45:06
    [RateCDR] => 1
)
  
[2025-02-26 03:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:45:06' and `end` < '2025-02-26 03:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:45:17] Production.INFO: count ==165  
[2025-02-26 03:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:45:06 - End Time 2025-02-26 03:45:06  
[2025-02-26 03:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559103', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559103', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:45:17] Production.INFO: ProcessCDR(1,14559103,1,1,2)  
[2025-02-26 03:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:45:21] Production.INFO: ==23181== Releasing lock...  
[2025-02-26 03:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:45:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:46:06
    [end_date_ymd] => 2025-02-26 03:46:06
    [RateCDR] => 1
)
  
[2025-02-26 03:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:46:06' and `end` < '2025-02-26 03:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:46:18] Production.INFO: count ==165  
[2025-02-26 03:46:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:46:06 - End Time 2025-02-26 03:46:06  
[2025-02-26 03:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559108', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559108', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559108', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559108', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:46:18] Production.INFO: ProcessCDR(1,14559108,1,1,2)  
[2025-02-26 03:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559108', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559108', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:46:21] Production.INFO: ==23273== Releasing lock...  
[2025-02-26 03:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:46:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:47:05
    [end_date_ymd] => 2025-02-26 03:47:05
    [RateCDR] => 1
)
  
[2025-02-26 03:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:47:05' and `end` < '2025-02-26 03:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:47:17] Production.INFO: count ==165  
[2025-02-26 03:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:47:05 - End Time 2025-02-26 03:47:05  
[2025-02-26 03:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559113', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559113', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559113', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559113', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:47:17] Production.INFO: ProcessCDR(1,14559113,1,1,2)  
[2025-02-26 03:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559113', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559113', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:47:21] Production.INFO: ==23350== Releasing lock...  
[2025-02-26 03:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:47:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:48:06
    [end_date_ymd] => 2025-02-26 03:48:06
    [RateCDR] => 1
)
  
[2025-02-26 03:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:48:06' and `end` < '2025-02-26 03:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:48:18] Production.INFO: count ==165  
[2025-02-26 03:48:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:48:06 - End Time 2025-02-26 03:48:06  
[2025-02-26 03:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559118', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559118', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559118', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559118', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:48:18] Production.INFO: ProcessCDR(1,14559118,1,1,2)  
[2025-02-26 03:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559118', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559118', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:48:21] Production.INFO: ==23424== Releasing lock...  
[2025-02-26 03:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:48:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:49:06
    [end_date_ymd] => 2025-02-26 03:49:06
    [RateCDR] => 1
)
  
[2025-02-26 03:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:49:06' and `end` < '2025-02-26 03:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:49:18] Production.INFO: count ==165  
[2025-02-26 03:49:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:49:06 - End Time 2025-02-26 03:49:06  
[2025-02-26 03:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559123', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559123', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559123', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559123', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:49:18] Production.INFO: ProcessCDR(1,14559123,1,1,2)  
[2025-02-26 03:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559123', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559123', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:49:22] Production.INFO: ==23499== Releasing lock...  
[2025-02-26 03:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:49:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:50:06
    [end_date_ymd] => 2025-02-26 03:50:06
    [RateCDR] => 1
)
  
[2025-02-26 03:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:50:06' and `end` < '2025-02-26 03:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:50:18] Production.INFO: count ==169  
[2025-02-26 03:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:50:06 - End Time 2025-02-26 03:50:06  
[2025-02-26 03:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559129', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559129', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:50:18] Production.INFO: ProcessCDR(1,14559129,1,1,2)  
[2025-02-26 03:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:50:22] Production.INFO: ==23570== Releasing lock...  
[2025-02-26 03:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:50:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:51:06
    [end_date_ymd] => 2025-02-26 03:51:06
    [RateCDR] => 1
)
  
[2025-02-26 03:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:51:06' and `end` < '2025-02-26 03:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:51:18] Production.INFO: count ==169  
[2025-02-26 03:51:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:51:06 - End Time 2025-02-26 03:51:06  
[2025-02-26 03:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559134', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559134', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:51:18] Production.INFO: ProcessCDR(1,14559134,1,1,2)  
[2025-02-26 03:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:51:21] Production.INFO: ==23681== Releasing lock...  
[2025-02-26 03:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:51:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:52:06
    [end_date_ymd] => 2025-02-26 03:52:06
    [RateCDR] => 1
)
  
[2025-02-26 03:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:52:06' and `end` < '2025-02-26 03:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:52:18] Production.INFO: count ==169  
[2025-02-26 03:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:52:06 - End Time 2025-02-26 03:52:06  
[2025-02-26 03:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559139', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559139', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:52:18] Production.INFO: ProcessCDR(1,14559139,1,1,2)  
[2025-02-26 03:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:52:21] Production.INFO: ==23753== Releasing lock...  
[2025-02-26 03:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:52:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:53:06
    [end_date_ymd] => 2025-02-26 03:53:06
    [RateCDR] => 1
)
  
[2025-02-26 03:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:53:06' and `end` < '2025-02-26 03:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:53:18] Production.INFO: count ==171  
[2025-02-26 03:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:53:06 - End Time 2025-02-26 03:53:06  
[2025-02-26 03:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559144', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559144', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:53:18] Production.INFO: ProcessCDR(1,14559144,1,1,2)  
[2025-02-26 03:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:53:22] Production.INFO: ==23829== Releasing lock...  
[2025-02-26 03:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:53:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:54:06
    [end_date_ymd] => 2025-02-26 03:54:06
    [RateCDR] => 1
)
  
[2025-02-26 03:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:54:06' and `end` < '2025-02-26 03:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:54:17] Production.INFO: count ==173  
[2025-02-26 03:54:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:54:06 - End Time 2025-02-26 03:54:06  
[2025-02-26 03:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559149', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559149', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:54:17] Production.INFO: ProcessCDR(1,14559149,1,1,2)  
[2025-02-26 03:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:54:21] Production.INFO: ==23902== Releasing lock...  
[2025-02-26 03:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:54:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:55:05
    [end_date_ymd] => 2025-02-26 03:55:05
    [RateCDR] => 1
)
  
[2025-02-26 03:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:55:05' and `end` < '2025-02-26 03:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:55:17] Production.INFO: count ==175  
[2025-02-26 03:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:55:05 - End Time 2025-02-26 03:55:05  
[2025-02-26 03:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559154', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559154', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:55:17] Production.INFO: ProcessCDR(1,14559154,1,1,2)  
[2025-02-26 03:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:55:21] Production.INFO: ==23976== Releasing lock...  
[2025-02-26 03:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:55:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:56:06
    [end_date_ymd] => 2025-02-26 03:56:06
    [RateCDR] => 1
)
  
[2025-02-26 03:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:56:06' and `end` < '2025-02-26 03:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:56:17] Production.INFO: count ==175  
[2025-02-26 03:56:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:56:06 - End Time 2025-02-26 03:56:06  
[2025-02-26 03:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559159', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559159', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559159', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559159', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:56:17] Production.INFO: ProcessCDR(1,14559159,1,1,2)  
[2025-02-26 03:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559159', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559159', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:56:21] Production.INFO: ==24049== Releasing lock...  
[2025-02-26 03:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:56:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:57:06
    [end_date_ymd] => 2025-02-26 03:57:06
    [RateCDR] => 1
)
  
[2025-02-26 03:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:57:06' and `end` < '2025-02-26 03:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:57:18] Production.INFO: count ==175  
[2025-02-26 03:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 00:57:06 - End Time 2025-02-26 03:57:06  
[2025-02-26 03:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559164', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559164', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559164', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559164', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:57:18] Production.INFO: ProcessCDR(1,14559164,1,1,2)  
[2025-02-26 03:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559164', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559164', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:57:21] Production.INFO: ==24119== Releasing lock...  
[2025-02-26 03:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:57:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:58:06
    [end_date_ymd] => 2025-02-26 03:58:06
    [RateCDR] => 1
)
  
[2025-02-26 03:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:58:06' and `end` < '2025-02-26 03:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:58:17] Production.INFO: count ==175  
[2025-02-26 03:58:17] Production.ERROR: pbx CDR StartTime 2025-02-26 00:58:06 - End Time 2025-02-26 03:58:06  
[2025-02-26 03:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559169', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559169', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559169', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559169', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:58:18] Production.INFO: ProcessCDR(1,14559169,1,1,2)  
[2025-02-26 03:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559169', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559169', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:58:21] Production.INFO: ==24189== Releasing lock...  
[2025-02-26 03:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:58:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 03:59:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 00:59:04
    [end_date_ymd] => 2025-02-26 03:59:04
    [RateCDR] => 1
)
  
[2025-02-26 03:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 00:59:04' and `end` < '2025-02-26 03:59:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 03:59:16] Production.INFO: count ==173  
[2025-02-26 03:59:16] Production.ERROR: pbx CDR StartTime 2025-02-26 00:59:04 - End Time 2025-02-26 03:59:04  
[2025-02-26 03:59:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 03:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559174', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559174', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559174', 'tblTempVendorCDR_20' ) start  
[2025-02-26 03:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559174', 'tblTempVendorCDR_20' ) end  
[2025-02-26 03:59:16] Production.INFO: ProcessCDR(1,14559174,1,1,2)  
[2025-02-26 03:59:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:59:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 03:59:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 03:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559174', 'tblTempUsageDetail_20' ) start  
[2025-02-26 03:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559174', 'tblTempUsageDetail_20' ) end  
[2025-02-26 03:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 03:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 03:59:20] Production.INFO: ==24259== Releasing lock...  
[2025-02-26 03:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 03:59:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:00:08] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:00:08
    [end_date_ymd] => 2025-02-26 04:00:08
    [RateCDR] => 1
)
  
[2025-02-26 04:00:08] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:00:08' and `end` < '2025-02-26 04:00:08'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:00:20] Production.INFO: count ==170  
[2025-02-26 04:00:20] Production.ERROR: pbx CDR StartTime 2025-02-26 01:00:08 - End Time 2025-02-26 04:00:08  
[2025-02-26 04:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559181', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559181', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:00:20] Production.INFO: ProcessCDR(1,14559181,1,1,2)  
[2025-02-26 04:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:00:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:00:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:00:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:00:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:00:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:00:24] Production.INFO: ==24338== Releasing lock...  
[2025-02-26 04:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:00:24] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 04:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:01:06
    [end_date_ymd] => 2025-02-26 04:01:06
    [RateCDR] => 1
)
  
[2025-02-26 04:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:01:06' and `end` < '2025-02-26 04:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:01:17] Production.INFO: count ==150  
[2025-02-26 04:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:01:06 - End Time 2025-02-26 04:01:06  
[2025-02-26 04:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559186', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559186', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:01:17] Production.INFO: ProcessCDR(1,14559186,1,1,2)  
[2025-02-26 04:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:01:21] Production.INFO: ==24431== Releasing lock...  
[2025-02-26 04:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:01:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:02:06
    [end_date_ymd] => 2025-02-26 04:02:06
    [RateCDR] => 1
)
  
[2025-02-26 04:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:02:06' and `end` < '2025-02-26 04:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:02:18] Production.INFO: count ==150  
[2025-02-26 04:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:02:06 - End Time 2025-02-26 04:02:06  
[2025-02-26 04:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559191', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559191', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:02:18] Production.INFO: ProcessCDR(1,14559191,1,1,2)  
[2025-02-26 04:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:02:21] Production.INFO: ==24501== Releasing lock...  
[2025-02-26 04:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:02:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:03:05
    [end_date_ymd] => 2025-02-26 04:03:05
    [RateCDR] => 1
)
  
[2025-02-26 04:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:03:05' and `end` < '2025-02-26 04:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:03:17] Production.INFO: count ==150  
[2025-02-26 04:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:03:05 - End Time 2025-02-26 04:03:05  
[2025-02-26 04:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559196', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559196', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:03:17] Production.INFO: ProcessCDR(1,14559196,1,1,2)  
[2025-02-26 04:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:03:20] Production.INFO: ==24571== Releasing lock...  
[2025-02-26 04:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:03:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:04:06
    [end_date_ymd] => 2025-02-26 04:04:06
    [RateCDR] => 1
)
  
[2025-02-26 04:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:04:06' and `end` < '2025-02-26 04:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:04:17] Production.INFO: count ==150  
[2025-02-26 04:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:04:06 - End Time 2025-02-26 04:04:06  
[2025-02-26 04:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559201', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559201', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:04:17] Production.INFO: ProcessCDR(1,14559201,1,1,2)  
[2025-02-26 04:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:04:21] Production.INFO: ==24641== Releasing lock...  
[2025-02-26 04:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:04:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:05:05
    [end_date_ymd] => 2025-02-26 04:05:05
    [RateCDR] => 1
)
  
[2025-02-26 04:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:05:05' and `end` < '2025-02-26 04:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:05:17] Production.INFO: count ==150  
[2025-02-26 04:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:05:05 - End Time 2025-02-26 04:05:05  
[2025-02-26 04:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559206', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559206', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:05:17] Production.INFO: ProcessCDR(1,14559206,1,1,2)  
[2025-02-26 04:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:05:20] Production.INFO: ==24716== Releasing lock...  
[2025-02-26 04:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:05:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:06:06
    [end_date_ymd] => 2025-02-26 04:06:06
    [RateCDR] => 1
)
  
[2025-02-26 04:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:06:06' and `end` < '2025-02-26 04:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:06:17] Production.INFO: count ==150  
[2025-02-26 04:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:06:06 - End Time 2025-02-26 04:06:06  
[2025-02-26 04:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559211', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559211', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:06:17] Production.INFO: ProcessCDR(1,14559211,1,1,2)  
[2025-02-26 04:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:06:21] Production.INFO: ==24788== Releasing lock...  
[2025-02-26 04:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:06:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:07:05
    [end_date_ymd] => 2025-02-26 04:07:05
    [RateCDR] => 1
)
  
[2025-02-26 04:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:07:05' and `end` < '2025-02-26 04:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:07:17] Production.INFO: count ==150  
[2025-02-26 04:07:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:07:05 - End Time 2025-02-26 04:07:05  
[2025-02-26 04:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559216', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559216', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:07:17] Production.INFO: ProcessCDR(1,14559216,1,1,2)  
[2025-02-26 04:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:07:20] Production.INFO: ==24897== Releasing lock...  
[2025-02-26 04:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:07:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:08:05
    [end_date_ymd] => 2025-02-26 04:08:05
    [RateCDR] => 1
)
  
[2025-02-26 04:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:08:05' and `end` < '2025-02-26 04:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:08:17] Production.INFO: count ==150  
[2025-02-26 04:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:08:05 - End Time 2025-02-26 04:08:05  
[2025-02-26 04:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559221', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559221', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:08:17] Production.INFO: ProcessCDR(1,14559221,1,1,2)  
[2025-02-26 04:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:08:20] Production.INFO: ==24969== Releasing lock...  
[2025-02-26 04:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:08:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:09:05
    [end_date_ymd] => 2025-02-26 04:09:05
    [RateCDR] => 1
)
  
[2025-02-26 04:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:09:05' and `end` < '2025-02-26 04:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:09:17] Production.INFO: count ==150  
[2025-02-26 04:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:09:05 - End Time 2025-02-26 04:09:05  
[2025-02-26 04:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559226', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559226', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:09:17] Production.INFO: ProcessCDR(1,14559226,1,1,2)  
[2025-02-26 04:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:09:21] Production.INFO: ==25040== Releasing lock...  
[2025-02-26 04:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:09:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:10:07
    [end_date_ymd] => 2025-02-26 04:10:07
    [RateCDR] => 1
)
  
[2025-02-26 04:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:10:07' and `end` < '2025-02-26 04:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:10:18] Production.INFO: count ==144  
[2025-02-26 04:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:10:07 - End Time 2025-02-26 04:10:07  
[2025-02-26 04:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559232', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559232', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:10:18] Production.INFO: ProcessCDR(1,14559232,1,1,2)  
[2025-02-26 04:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:10:22] Production.INFO: ==25116== Releasing lock...  
[2025-02-26 04:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:10:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:11:05
    [end_date_ymd] => 2025-02-26 04:11:05
    [RateCDR] => 1
)
  
[2025-02-26 04:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:11:05' and `end` < '2025-02-26 04:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:11:17] Production.INFO: count ==142  
[2025-02-26 04:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:11:05 - End Time 2025-02-26 04:11:05  
[2025-02-26 04:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559237', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559237', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:11:17] Production.INFO: ProcessCDR(1,14559237,1,1,2)  
[2025-02-26 04:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:11:21] Production.INFO: ==25189== Releasing lock...  
[2025-02-26 04:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:11:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:12:06
    [end_date_ymd] => 2025-02-26 04:12:06
    [RateCDR] => 1
)
  
[2025-02-26 04:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:12:06' and `end` < '2025-02-26 04:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:12:18] Production.INFO: count ==142  
[2025-02-26 04:12:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:12:06 - End Time 2025-02-26 04:12:06  
[2025-02-26 04:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559242', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559242', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:12:18] Production.INFO: ProcessCDR(1,14559242,1,1,2)  
[2025-02-26 04:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:12:21] Production.INFO: ==25287== Releasing lock...  
[2025-02-26 04:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:12:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:13:05
    [end_date_ymd] => 2025-02-26 04:13:05
    [RateCDR] => 1
)
  
[2025-02-26 04:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:13:05' and `end` < '2025-02-26 04:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:13:17] Production.INFO: count ==142  
[2025-02-26 04:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:13:05 - End Time 2025-02-26 04:13:05  
[2025-02-26 04:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559247', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559247', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:13:17] Production.INFO: ProcessCDR(1,14559247,1,1,2)  
[2025-02-26 04:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:13:20] Production.INFO: ==25377== Releasing lock...  
[2025-02-26 04:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:13:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:14:06
    [end_date_ymd] => 2025-02-26 04:14:06
    [RateCDR] => 1
)
  
[2025-02-26 04:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:14:06' and `end` < '2025-02-26 04:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:14:17] Production.INFO: count ==142  
[2025-02-26 04:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:14:06 - End Time 2025-02-26 04:14:06  
[2025-02-26 04:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559252', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559252', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:14:17] Production.INFO: ProcessCDR(1,14559252,1,1,2)  
[2025-02-26 04:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:14:21] Production.INFO: ==25475== Releasing lock...  
[2025-02-26 04:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:14:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 04:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:15:05
    [end_date_ymd] => 2025-02-26 04:15:05
    [RateCDR] => 1
)
  
[2025-02-26 04:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:15:05' and `end` < '2025-02-26 04:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:15:17] Production.INFO: count ==141  
[2025-02-26 04:15:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:15:05 - End Time 2025-02-26 04:15:05  
[2025-02-26 04:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559257', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559257', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:15:17] Production.INFO: ProcessCDR(1,14559257,1,1,2)  
[2025-02-26 04:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:15:20] Production.INFO: ==25571== Releasing lock...  
[2025-02-26 04:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:15:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:16:06
    [end_date_ymd] => 2025-02-26 04:16:06
    [RateCDR] => 1
)
  
[2025-02-26 04:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:16:06' and `end` < '2025-02-26 04:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:16:17] Production.INFO: count ==141  
[2025-02-26 04:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:16:06 - End Time 2025-02-26 04:16:06  
[2025-02-26 04:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559262', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559262', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:16:17] Production.INFO: ProcessCDR(1,14559262,1,1,2)  
[2025-02-26 04:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:16:21] Production.INFO: ==25642== Releasing lock...  
[2025-02-26 04:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:16:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:17:05
    [end_date_ymd] => 2025-02-26 04:17:05
    [RateCDR] => 1
)
  
[2025-02-26 04:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:17:05' and `end` < '2025-02-26 04:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:17:17] Production.INFO: count ==141  
[2025-02-26 04:17:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:17:05 - End Time 2025-02-26 04:17:05  
[2025-02-26 04:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559267', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559267', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:17:17] Production.INFO: ProcessCDR(1,14559267,1,1,2)  
[2025-02-26 04:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:17:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:17:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:17:20] Production.INFO: ==25715== Releasing lock...  
[2025-02-26 04:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:17:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:18:06
    [end_date_ymd] => 2025-02-26 04:18:06
    [RateCDR] => 1
)
  
[2025-02-26 04:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:18:06' and `end` < '2025-02-26 04:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:18:17] Production.INFO: count ==141  
[2025-02-26 04:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:18:06 - End Time 2025-02-26 04:18:06  
[2025-02-26 04:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559272', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559272', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:18:17] Production.INFO: ProcessCDR(1,14559272,1,1,2)  
[2025-02-26 04:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:18:21] Production.INFO: ==25796== Releasing lock...  
[2025-02-26 04:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:18:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:19:05
    [end_date_ymd] => 2025-02-26 04:19:05
    [RateCDR] => 1
)
  
[2025-02-26 04:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:19:05' and `end` < '2025-02-26 04:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:19:17] Production.INFO: count ==141  
[2025-02-26 04:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:19:05 - End Time 2025-02-26 04:19:05  
[2025-02-26 04:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559277', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559277', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:19:17] Production.INFO: ProcessCDR(1,14559277,1,1,2)  
[2025-02-26 04:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:19:20] Production.INFO: ==25868== Releasing lock...  
[2025-02-26 04:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:19:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:20:06
    [end_date_ymd] => 2025-02-26 04:20:06
    [RateCDR] => 1
)
  
[2025-02-26 04:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:20:06' and `end` < '2025-02-26 04:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:20:18] Production.INFO: count ==141  
[2025-02-26 04:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:20:06 - End Time 2025-02-26 04:20:06  
[2025-02-26 04:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559283', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559283', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:20:18] Production.INFO: ProcessCDR(1,14559283,1,1,2)  
[2025-02-26 04:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:20:21] Production.INFO: ==25940== Releasing lock...  
[2025-02-26 04:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:20:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:21:05
    [end_date_ymd] => 2025-02-26 04:21:05
    [RateCDR] => 1
)
  
[2025-02-26 04:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:21:05' and `end` < '2025-02-26 04:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:21:17] Production.INFO: count ==141  
[2025-02-26 04:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:21:05 - End Time 2025-02-26 04:21:05  
[2025-02-26 04:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559288', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559288', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:21:17] Production.INFO: ProcessCDR(1,14559288,1,1,2)  
[2025-02-26 04:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:21:20] Production.INFO: ==26012== Releasing lock...  
[2025-02-26 04:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:21:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:22:05
    [end_date_ymd] => 2025-02-26 04:22:05
    [RateCDR] => 1
)
  
[2025-02-26 04:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:22:05' and `end` < '2025-02-26 04:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:22:17] Production.INFO: count ==140  
[2025-02-26 04:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:22:05 - End Time 2025-02-26 04:22:05  
[2025-02-26 04:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559293', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559293', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:22:17] Production.INFO: ProcessCDR(1,14559293,1,1,2)  
[2025-02-26 04:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:22:21] Production.INFO: ==26121== Releasing lock...  
[2025-02-26 04:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:22:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:23:05
    [end_date_ymd] => 2025-02-26 04:23:05
    [RateCDR] => 1
)
  
[2025-02-26 04:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:23:05' and `end` < '2025-02-26 04:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:23:17] Production.INFO: count ==140  
[2025-02-26 04:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:23:05 - End Time 2025-02-26 04:23:05  
[2025-02-26 04:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559298', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559298', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:23:17] Production.INFO: ProcessCDR(1,14559298,1,1,2)  
[2025-02-26 04:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:23:21] Production.INFO: ==26192== Releasing lock...  
[2025-02-26 04:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:23:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:24:05
    [end_date_ymd] => 2025-02-26 04:24:05
    [RateCDR] => 1
)
  
[2025-02-26 04:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:24:05' and `end` < '2025-02-26 04:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:24:17] Production.INFO: count ==136  
[2025-02-26 04:24:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:24:05 - End Time 2025-02-26 04:24:05  
[2025-02-26 04:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559303', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559303', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:24:17] Production.INFO: ProcessCDR(1,14559303,1,1,2)  
[2025-02-26 04:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:24:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:24:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:24:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:24:20] Production.INFO: ==26265== Releasing lock...  
[2025-02-26 04:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:24:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:25:05
    [end_date_ymd] => 2025-02-26 04:25:05
    [RateCDR] => 1
)
  
[2025-02-26 04:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:25:05' and `end` < '2025-02-26 04:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:25:17] Production.INFO: count ==132  
[2025-02-26 04:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:25:05 - End Time 2025-02-26 04:25:05  
[2025-02-26 04:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559308', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559308', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:25:17] Production.INFO: ProcessCDR(1,14559308,1,1,2)  
[2025-02-26 04:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:25:20] Production.INFO: ==26336== Releasing lock...  
[2025-02-26 04:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:25:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:26:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:26:04
    [end_date_ymd] => 2025-02-26 04:26:04
    [RateCDR] => 1
)
  
[2025-02-26 04:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:26:04' and `end` < '2025-02-26 04:26:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:26:16] Production.INFO: count ==132  
[2025-02-26 04:26:16] Production.ERROR: pbx CDR StartTime 2025-02-26 01:26:04 - End Time 2025-02-26 04:26:04  
[2025-02-26 04:26:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559313', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:26:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559313', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:26:16] Production.INFO: ProcessCDR(1,14559313,1,1,2)  
[2025-02-26 04:26:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:26:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:26:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:26:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:26:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:26:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:26:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:26:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:26:19] Production.INFO: ==26411== Releasing lock...  
[2025-02-26 04:26:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:26:19] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:27:05
    [end_date_ymd] => 2025-02-26 04:27:05
    [RateCDR] => 1
)
  
[2025-02-26 04:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:27:05' and `end` < '2025-02-26 04:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:27:17] Production.INFO: count ==132  
[2025-02-26 04:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:27:05 - End Time 2025-02-26 04:27:05  
[2025-02-26 04:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559318', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559318', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:27:17] Production.INFO: ProcessCDR(1,14559318,1,1,2)  
[2025-02-26 04:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:27:20] Production.INFO: ==26483== Releasing lock...  
[2025-02-26 04:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:27:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:28:05
    [end_date_ymd] => 2025-02-26 04:28:05
    [RateCDR] => 1
)
  
[2025-02-26 04:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:28:05' and `end` < '2025-02-26 04:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:28:16] Production.INFO: count ==132  
[2025-02-26 04:28:16] Production.ERROR: pbx CDR StartTime 2025-02-26 01:28:05 - End Time 2025-02-26 04:28:05  
[2025-02-26 04:28:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:28:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:28:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:28:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559323', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:28:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559323', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:28:16] Production.INFO: ProcessCDR(1,14559323,1,1,2)  
[2025-02-26 04:28:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:28:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:28:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:28:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:28:20] Production.INFO: ==26553== Releasing lock...  
[2025-02-26 04:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:28:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:29:05
    [end_date_ymd] => 2025-02-26 04:29:05
    [RateCDR] => 1
)
  
[2025-02-26 04:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:29:05' and `end` < '2025-02-26 04:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:29:17] Production.INFO: count ==132  
[2025-02-26 04:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:29:05 - End Time 2025-02-26 04:29:05  
[2025-02-26 04:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559328', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559328', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:29:17] Production.INFO: ProcessCDR(1,14559328,1,1,2)  
[2025-02-26 04:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:29:20] Production.INFO: ==26628== Releasing lock...  
[2025-02-26 04:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:29:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:30:06
    [end_date_ymd] => 2025-02-26 04:30:06
    [RateCDR] => 1
)
  
[2025-02-26 04:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:30:06' and `end` < '2025-02-26 04:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:30:18] Production.INFO: count ==128  
[2025-02-26 04:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:30:06 - End Time 2025-02-26 04:30:06  
[2025-02-26 04:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559333', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559333', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:30:18] Production.INFO: ProcessCDR(1,14559333,1,1,2)  
[2025-02-26 04:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:30:21] Production.INFO: ==26703== Releasing lock...  
[2025-02-26 04:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:30:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 04:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:31:05
    [end_date_ymd] => 2025-02-26 04:31:05
    [RateCDR] => 1
)
  
[2025-02-26 04:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:31:05' and `end` < '2025-02-26 04:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:31:17] Production.INFO: count ==120  
[2025-02-26 04:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:31:05 - End Time 2025-02-26 04:31:05  
[2025-02-26 04:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559340', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559340', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559340', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559340', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:31:17] Production.INFO: ProcessCDR(1,14559340,1,1,2)  
[2025-02-26 04:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559340', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559340', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:31:20] Production.INFO: ==26783== Releasing lock...  
[2025-02-26 04:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:31:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:32:06
    [end_date_ymd] => 2025-02-26 04:32:06
    [RateCDR] => 1
)
  
[2025-02-26 04:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:32:06' and `end` < '2025-02-26 04:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:32:18] Production.INFO: count ==116  
[2025-02-26 04:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:32:06 - End Time 2025-02-26 04:32:06  
[2025-02-26 04:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559345', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559345', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559345', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559345', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:32:18] Production.INFO: ProcessCDR(1,14559345,1,1,2)  
[2025-02-26 04:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:32:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559345', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559345', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:32:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:32:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:32:22] Production.INFO: ==26871== Releasing lock...  
[2025-02-26 04:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:32:22] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:33:05
    [end_date_ymd] => 2025-02-26 04:33:05
    [RateCDR] => 1
)
  
[2025-02-26 04:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:33:05' and `end` < '2025-02-26 04:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:33:17] Production.INFO: count ==115  
[2025-02-26 04:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:33:05 - End Time 2025-02-26 04:33:05  
[2025-02-26 04:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559350', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559350', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559350', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559350', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:33:17] Production.INFO: ProcessCDR(1,14559350,1,1,2)  
[2025-02-26 04:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559350', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559350', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:33:20] Production.INFO: ==26940== Releasing lock...  
[2025-02-26 04:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:33:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:34:06
    [end_date_ymd] => 2025-02-26 04:34:06
    [RateCDR] => 1
)
  
[2025-02-26 04:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:34:06' and `end` < '2025-02-26 04:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:34:17] Production.INFO: count ==115  
[2025-02-26 04:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:34:06 - End Time 2025-02-26 04:34:06  
[2025-02-26 04:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559355', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559355', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559355', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559355', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:34:17] Production.INFO: ProcessCDR(1,14559355,1,1,2)  
[2025-02-26 04:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:34:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559355', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559355', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:34:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:34:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:34:20] Production.INFO: ==27012== Releasing lock...  
[2025-02-26 04:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:34:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:35:05
    [end_date_ymd] => 2025-02-26 04:35:05
    [RateCDR] => 1
)
  
[2025-02-26 04:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:35:05' and `end` < '2025-02-26 04:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:35:16] Production.INFO: count ==115  
[2025-02-26 04:35:16] Production.ERROR: pbx CDR StartTime 2025-02-26 01:35:05 - End Time 2025-02-26 04:35:05  
[2025-02-26 04:35:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559360', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559360', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559360', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559360', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:35:16] Production.INFO: ProcessCDR(1,14559360,1,1,2)  
[2025-02-26 04:35:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:35:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:35:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559360', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559360', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:35:20] Production.INFO: ==27082== Releasing lock...  
[2025-02-26 04:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:35:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:36:05
    [end_date_ymd] => 2025-02-26 04:36:05
    [RateCDR] => 1
)
  
[2025-02-26 04:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:36:05' and `end` < '2025-02-26 04:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:36:17] Production.INFO: count ==115  
[2025-02-26 04:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:36:05 - End Time 2025-02-26 04:36:05  
[2025-02-26 04:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559365', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559365', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559365', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559365', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:36:17] Production.INFO: ProcessCDR(1,14559365,1,1,2)  
[2025-02-26 04:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559365', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559365', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:36:21] Production.INFO: ==27156== Releasing lock...  
[2025-02-26 04:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:36:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:37:05
    [end_date_ymd] => 2025-02-26 04:37:05
    [RateCDR] => 1
)
  
[2025-02-26 04:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:37:05' and `end` < '2025-02-26 04:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:37:17] Production.INFO: count ==115  
[2025-02-26 04:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:37:05 - End Time 2025-02-26 04:37:05  
[2025-02-26 04:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559370', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559370', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559370', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559370', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:37:17] Production.INFO: ProcessCDR(1,14559370,1,1,2)  
[2025-02-26 04:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559370', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559370', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:37:20] Production.INFO: ==27228== Releasing lock...  
[2025-02-26 04:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:37:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:38:06
    [end_date_ymd] => 2025-02-26 04:38:06
    [RateCDR] => 1
)
  
[2025-02-26 04:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:38:06' and `end` < '2025-02-26 04:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:38:18] Production.INFO: count ==119  
[2025-02-26 04:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:38:06 - End Time 2025-02-26 04:38:06  
[2025-02-26 04:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559375', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559375', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:38:18] Production.INFO: ProcessCDR(1,14559375,1,1,2)  
[2025-02-26 04:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:38:21] Production.INFO: ==27341== Releasing lock...  
[2025-02-26 04:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:38:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:39:05
    [end_date_ymd] => 2025-02-26 04:39:05
    [RateCDR] => 1
)
  
[2025-02-26 04:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:39:05' and `end` < '2025-02-26 04:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:39:17] Production.INFO: count ==119  
[2025-02-26 04:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:39:05 - End Time 2025-02-26 04:39:05  
[2025-02-26 04:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559380', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559380', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:39:17] Production.INFO: ProcessCDR(1,14559380,1,1,2)  
[2025-02-26 04:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:39:20] Production.INFO: ==27413== Releasing lock...  
[2025-02-26 04:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:39:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:40:06
    [end_date_ymd] => 2025-02-26 04:40:06
    [RateCDR] => 1
)
  
[2025-02-26 04:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:40:06' and `end` < '2025-02-26 04:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:40:18] Production.INFO: count ==121  
[2025-02-26 04:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:40:06 - End Time 2025-02-26 04:40:06  
[2025-02-26 04:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559385', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559385', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:40:18] Production.INFO: ProcessCDR(1,14559385,1,1,2)  
[2025-02-26 04:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:40:21] Production.INFO: ==27486== Releasing lock...  
[2025-02-26 04:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:40:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:41:05
    [end_date_ymd] => 2025-02-26 04:41:05
    [RateCDR] => 1
)
  
[2025-02-26 04:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:41:05' and `end` < '2025-02-26 04:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:41:17] Production.INFO: count ==121  
[2025-02-26 04:41:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:41:05 - End Time 2025-02-26 04:41:05  
[2025-02-26 04:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559391', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559391', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559391', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559391', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:41:17] Production.INFO: ProcessCDR(1,14559391,1,1,2)  
[2025-02-26 04:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559391', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559391', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:41:20] Production.INFO: ==27558== Releasing lock...  
[2025-02-26 04:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:41:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:42:06
    [end_date_ymd] => 2025-02-26 04:42:06
    [RateCDR] => 1
)
  
[2025-02-26 04:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:42:06' and `end` < '2025-02-26 04:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:42:18] Production.INFO: count ==121  
[2025-02-26 04:42:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:42:06 - End Time 2025-02-26 04:42:06  
[2025-02-26 04:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559396', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559396', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559396', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559396', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:42:18] Production.INFO: ProcessCDR(1,14559396,1,1,2)  
[2025-02-26 04:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559396', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559396', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:42:21] Production.INFO: ==27630== Releasing lock...  
[2025-02-26 04:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:42:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:43:05
    [end_date_ymd] => 2025-02-26 04:43:05
    [RateCDR] => 1
)
  
[2025-02-26 04:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:43:05' and `end` < '2025-02-26 04:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:43:17] Production.INFO: count ==121  
[2025-02-26 04:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:43:05 - End Time 2025-02-26 04:43:05  
[2025-02-26 04:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559401', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559401', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559401', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559401', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:43:17] Production.INFO: ProcessCDR(1,14559401,1,1,2)  
[2025-02-26 04:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559401', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559401', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:43:21] Production.INFO: ==27703== Releasing lock...  
[2025-02-26 04:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:43:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:44:05
    [end_date_ymd] => 2025-02-26 04:44:05
    [RateCDR] => 1
)
  
[2025-02-26 04:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:44:05' and `end` < '2025-02-26 04:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:44:17] Production.INFO: count ==121  
[2025-02-26 04:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:44:05 - End Time 2025-02-26 04:44:05  
[2025-02-26 04:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559406', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559406', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559406', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559406', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:44:17] Production.INFO: ProcessCDR(1,14559406,1,1,2)  
[2025-02-26 04:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559406', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559406', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:44:21] Production.INFO: ==27778== Releasing lock...  
[2025-02-26 04:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:44:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:45:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:45:04
    [end_date_ymd] => 2025-02-26 04:45:04
    [RateCDR] => 1
)
  
[2025-02-26 04:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:45:04' and `end` < '2025-02-26 04:45:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:45:16] Production.INFO: count ==121  
[2025-02-26 04:45:16] Production.ERROR: pbx CDR StartTime 2025-02-26 01:45:04 - End Time 2025-02-26 04:45:04  
[2025-02-26 04:45:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559411', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559411', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559411', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559411', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:45:16] Production.INFO: ProcessCDR(1,14559411,1,1,2)  
[2025-02-26 04:45:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:45:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:45:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:45:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:45:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559411', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:45:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559411', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:45:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:45:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:45:19] Production.INFO: ==27849== Releasing lock...  
[2025-02-26 04:45:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:45:19] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:46:06
    [end_date_ymd] => 2025-02-26 04:46:06
    [RateCDR] => 1
)
  
[2025-02-26 04:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:46:06' and `end` < '2025-02-26 04:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:46:18] Production.INFO: count ==121  
[2025-02-26 04:46:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:46:06 - End Time 2025-02-26 04:46:06  
[2025-02-26 04:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559416', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559416', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559416', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559416', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:46:18] Production.INFO: ProcessCDR(1,14559416,1,1,2)  
[2025-02-26 04:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559416', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559416', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:46:21] Production.INFO: ==27922== Releasing lock...  
[2025-02-26 04:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:46:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:47:05
    [end_date_ymd] => 2025-02-26 04:47:05
    [RateCDR] => 1
)
  
[2025-02-26 04:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:47:05' and `end` < '2025-02-26 04:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:47:17] Production.INFO: count ==121  
[2025-02-26 04:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:47:05 - End Time 2025-02-26 04:47:05  
[2025-02-26 04:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559421', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559421', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559421', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559421', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:47:17] Production.INFO: ProcessCDR(1,14559421,1,1,2)  
[2025-02-26 04:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559421', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559421', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:47:20] Production.INFO: ==27993== Releasing lock...  
[2025-02-26 04:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:47:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:48:05
    [end_date_ymd] => 2025-02-26 04:48:05
    [RateCDR] => 1
)
  
[2025-02-26 04:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:48:05' and `end` < '2025-02-26 04:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:48:17] Production.INFO: count ==121  
[2025-02-26 04:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:48:05 - End Time 2025-02-26 04:48:05  
[2025-02-26 04:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559426', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559426', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:48:17] Production.INFO: ProcessCDR(1,14559426,1,1,2)  
[2025-02-26 04:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:48:21] Production.INFO: ==28063== Releasing lock...  
[2025-02-26 04:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:48:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:49:05
    [end_date_ymd] => 2025-02-26 04:49:05
    [RateCDR] => 1
)
  
[2025-02-26 04:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:49:05' and `end` < '2025-02-26 04:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:49:17] Production.INFO: count ==121  
[2025-02-26 04:49:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:49:05 - End Time 2025-02-26 04:49:05  
[2025-02-26 04:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559431', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559431', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:49:17] Production.INFO: ProcessCDR(1,14559431,1,1,2)  
[2025-02-26 04:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:49:21] Production.INFO: ==28140== Releasing lock...  
[2025-02-26 04:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:49:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:50:06
    [end_date_ymd] => 2025-02-26 04:50:06
    [RateCDR] => 1
)
  
[2025-02-26 04:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:50:06' and `end` < '2025-02-26 04:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:50:18] Production.INFO: count ==125  
[2025-02-26 04:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:50:06 - End Time 2025-02-26 04:50:06  
[2025-02-26 04:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559437', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559437', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559437', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559437', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:50:18] Production.INFO: ProcessCDR(1,14559437,1,1,2)  
[2025-02-26 04:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559437', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559437', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:50:21] Production.INFO: ==28216== Releasing lock...  
[2025-02-26 04:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:50:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:51:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:51:04
    [end_date_ymd] => 2025-02-26 04:51:04
    [RateCDR] => 1
)
  
[2025-02-26 04:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:51:04' and `end` < '2025-02-26 04:51:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:51:16] Production.INFO: count ==125  
[2025-02-26 04:51:16] Production.ERROR: pbx CDR StartTime 2025-02-26 01:51:04 - End Time 2025-02-26 04:51:04  
[2025-02-26 04:51:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:51:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559442', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:51:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559442', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:51:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559442', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:51:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559442', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:51:16] Production.INFO: ProcessCDR(1,14559442,1,1,2)  
[2025-02-26 04:51:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:51:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:51:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559442', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559442', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:51:20] Production.INFO: ==28299== Releasing lock...  
[2025-02-26 04:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:51:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:52:05
    [end_date_ymd] => 2025-02-26 04:52:05
    [RateCDR] => 1
)
  
[2025-02-26 04:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:52:05' and `end` < '2025-02-26 04:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:52:18] Production.INFO: count ==125  
[2025-02-26 04:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:52:05 - End Time 2025-02-26 04:52:05  
[2025-02-26 04:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559447', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559447', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559447', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559447', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:52:18] Production.INFO: ProcessCDR(1,14559447,1,1,2)  
[2025-02-26 04:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559447', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559447', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:52:21] Production.INFO: ==28374== Releasing lock...  
[2025-02-26 04:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:52:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:53:05
    [end_date_ymd] => 2025-02-26 04:53:05
    [RateCDR] => 1
)
  
[2025-02-26 04:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:53:05' and `end` < '2025-02-26 04:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:53:17] Production.INFO: count ==125  
[2025-02-26 04:53:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:53:05 - End Time 2025-02-26 04:53:05  
[2025-02-26 04:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559452', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559452', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559452', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559452', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:53:17] Production.INFO: ProcessCDR(1,14559452,1,1,2)  
[2025-02-26 04:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:53:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559452', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559452', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:53:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:53:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:53:20] Production.INFO: ==28488== Releasing lock...  
[2025-02-26 04:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:53:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:54:05
    [end_date_ymd] => 2025-02-26 04:54:05
    [RateCDR] => 1
)
  
[2025-02-26 04:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:54:05' and `end` < '2025-02-26 04:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:54:19] Production.INFO: count ==125  
[2025-02-26 04:54:19] Production.ERROR: pbx CDR StartTime 2025-02-26 01:54:05 - End Time 2025-02-26 04:54:05  
[2025-02-26 04:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559457', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559457', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559457', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559457', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:54:19] Production.INFO: ProcessCDR(1,14559457,1,1,2)  
[2025-02-26 04:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559457', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559457', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:54:22] Production.INFO: ==28566== Releasing lock...  
[2025-02-26 04:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:54:22] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:55:05
    [end_date_ymd] => 2025-02-26 04:55:05
    [RateCDR] => 1
)
  
[2025-02-26 04:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:55:05' and `end` < '2025-02-26 04:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:55:17] Production.INFO: count ==125  
[2025-02-26 04:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 01:55:05 - End Time 2025-02-26 04:55:05  
[2025-02-26 04:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559462', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559462', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559462', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559462', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:55:17] Production.INFO: ProcessCDR(1,14559462,1,1,2)  
[2025-02-26 04:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559462', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559462', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:55:20] Production.INFO: ==28646== Releasing lock...  
[2025-02-26 04:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:55:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:56:06
    [end_date_ymd] => 2025-02-26 04:56:06
    [RateCDR] => 1
)
  
[2025-02-26 04:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:56:06' and `end` < '2025-02-26 04:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:56:18] Production.INFO: count ==125  
[2025-02-26 04:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:56:06 - End Time 2025-02-26 04:56:06  
[2025-02-26 04:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559467', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559467', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559467', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559467', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:56:18] Production.INFO: ProcessCDR(1,14559467,1,1,2)  
[2025-02-26 04:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559467', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559467', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:56:21] Production.INFO: ==28725== Releasing lock...  
[2025-02-26 04:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:56:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:57:06
    [end_date_ymd] => 2025-02-26 04:57:06
    [RateCDR] => 1
)
  
[2025-02-26 04:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:57:06' and `end` < '2025-02-26 04:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:57:18] Production.INFO: count ==119  
[2025-02-26 04:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:57:06 - End Time 2025-02-26 04:57:06  
[2025-02-26 04:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559472', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559472', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559472', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559472', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:57:18] Production.INFO: ProcessCDR(1,14559472,1,1,2)  
[2025-02-26 04:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559472', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559472', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:57:21] Production.INFO: ==28829== Releasing lock...  
[2025-02-26 04:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:57:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:58:05
    [end_date_ymd] => 2025-02-26 04:58:05
    [RateCDR] => 1
)
  
[2025-02-26 04:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:58:05' and `end` < '2025-02-26 04:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:58:19] Production.INFO: count ==119  
[2025-02-26 04:58:19] Production.ERROR: pbx CDR StartTime 2025-02-26 01:58:05 - End Time 2025-02-26 04:58:05  
[2025-02-26 04:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559477', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559477', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:58:19] Production.INFO: ProcessCDR(1,14559477,1,1,2)  
[2025-02-26 04:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:58:22] Production.INFO: ==28907== Releasing lock...  
[2025-02-26 04:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:58:22] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 04:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 01:59:05
    [end_date_ymd] => 2025-02-26 04:59:05
    [RateCDR] => 1
)
  
[2025-02-26 04:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 01:59:05' and `end` < '2025-02-26 04:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 04:59:18] Production.INFO: count ==119  
[2025-02-26 04:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 01:59:05 - End Time 2025-02-26 04:59:05  
[2025-02-26 04:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 04:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559482', 'tblTempVendorCDR_20' ) start  
[2025-02-26 04:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559482', 'tblTempVendorCDR_20' ) end  
[2025-02-26 04:59:18] Production.INFO: ProcessCDR(1,14559482,1,1,2)  
[2025-02-26 04:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 04:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 04:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 04:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 04:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 04:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 04:59:21] Production.INFO: ==28992== Releasing lock...  
[2025-02-26 04:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 04:59:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:00:06
    [end_date_ymd] => 2025-02-26 05:00:06
    [RateCDR] => 1
)
  
[2025-02-26 05:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:00:06' and `end` < '2025-02-26 05:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:00:18] Production.INFO: count ==115  
[2025-02-26 05:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:00:06 - End Time 2025-02-26 05:00:06  
[2025-02-26 05:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559487', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559487', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:00:18] Production.INFO: ProcessCDR(1,14559487,1,1,2)  
[2025-02-26 05:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:00:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:00:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:00:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:00:21] Production.INFO: ==29077== Releasing lock...  
[2025-02-26 05:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:00:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:01:06
    [end_date_ymd] => 2025-02-26 05:01:06
    [RateCDR] => 1
)
  
[2025-02-26 05:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:01:06' and `end` < '2025-02-26 05:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:01:20] Production.INFO: count ==109  
[2025-02-26 05:01:20] Production.ERROR: pbx CDR StartTime 2025-02-26 02:01:06 - End Time 2025-02-26 05:01:06  
[2025-02-26 05:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559493', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559493', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559493', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559493', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:01:20] Production.INFO: ProcessCDR(1,14559493,1,1,2)  
[2025-02-26 05:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:01:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:01:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:01:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559493', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559493', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:01:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:01:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:01:23] Production.INFO: ==29166== Releasing lock...  
[2025-02-26 05:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:01:23] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:02:05
    [end_date_ymd] => 2025-02-26 05:02:05
    [RateCDR] => 1
)
  
[2025-02-26 05:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:02:05' and `end` < '2025-02-26 05:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:02:17] Production.INFO: count ==109  
[2025-02-26 05:02:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:02:05 - End Time 2025-02-26 05:02:05  
[2025-02-26 05:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559498', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559498', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559498', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559498', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:02:17] Production.INFO: ProcessCDR(1,14559498,1,1,2)  
[2025-02-26 05:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:02:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559498', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559498', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:02:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:02:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:02:20] Production.INFO: ==29246== Releasing lock...  
[2025-02-26 05:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:02:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:03:05
    [end_date_ymd] => 2025-02-26 05:03:05
    [RateCDR] => 1
)
  
[2025-02-26 05:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:03:05' and `end` < '2025-02-26 05:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:03:17] Production.INFO: count ==109  
[2025-02-26 05:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:03:05 - End Time 2025-02-26 05:03:05  
[2025-02-26 05:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559503', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559503', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559503', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559503', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:03:17] Production.INFO: ProcessCDR(1,14559503,1,1,2)  
[2025-02-26 05:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559503', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559503', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:03:21] Production.INFO: ==29321== Releasing lock...  
[2025-02-26 05:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:03:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:04:05
    [end_date_ymd] => 2025-02-26 05:04:05
    [RateCDR] => 1
)
  
[2025-02-26 05:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:04:05' and `end` < '2025-02-26 05:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:04:17] Production.INFO: count ==108  
[2025-02-26 05:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:04:05 - End Time 2025-02-26 05:04:05  
[2025-02-26 05:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559508', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559508', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559508', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559508', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:04:17] Production.INFO: ProcessCDR(1,14559508,1,1,2)  
[2025-02-26 05:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559508', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559508', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:04:21] Production.INFO: ==29397== Releasing lock...  
[2025-02-26 05:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:04:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:05:05
    [end_date_ymd] => 2025-02-26 05:05:05
    [RateCDR] => 1
)
  
[2025-02-26 05:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:05:05' and `end` < '2025-02-26 05:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:05:17] Production.INFO: count ==108  
[2025-02-26 05:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:05:05 - End Time 2025-02-26 05:05:05  
[2025-02-26 05:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559513', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559513', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559513', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559513', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:05:17] Production.INFO: ProcessCDR(1,14559513,1,1,2)  
[2025-02-26 05:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559513', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559513', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:05:20] Production.INFO: ==29468== Releasing lock...  
[2025-02-26 05:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:05:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:06:05
    [end_date_ymd] => 2025-02-26 05:06:05
    [RateCDR] => 1
)
  
[2025-02-26 05:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:06:05' and `end` < '2025-02-26 05:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:06:18] Production.INFO: count ==108  
[2025-02-26 05:06:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:06:05 - End Time 2025-02-26 05:06:05  
[2025-02-26 05:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559518', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559518', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559518', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559518', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:06:18] Production.INFO: ProcessCDR(1,14559518,1,1,2)  
[2025-02-26 05:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559518', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559518', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:06:21] Production.INFO: ==29544== Releasing lock...  
[2025-02-26 05:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:06:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:07:05
    [end_date_ymd] => 2025-02-26 05:07:05
    [RateCDR] => 1
)
  
[2025-02-26 05:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:07:05' and `end` < '2025-02-26 05:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:07:17] Production.INFO: count ==108  
[2025-02-26 05:07:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:07:05 - End Time 2025-02-26 05:07:05  
[2025-02-26 05:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559523', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559523', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559523', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559523', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:07:17] Production.INFO: ProcessCDR(1,14559523,1,1,2)  
[2025-02-26 05:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559523', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559523', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:07:20] Production.INFO: ==29623== Releasing lock...  
[2025-02-26 05:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:07:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 05:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:08:05
    [end_date_ymd] => 2025-02-26 05:08:05
    [RateCDR] => 1
)
  
[2025-02-26 05:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:08:05' and `end` < '2025-02-26 05:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:08:17] Production.INFO: count ==105  
[2025-02-26 05:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:08:05 - End Time 2025-02-26 05:08:05  
[2025-02-26 05:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559528', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559528', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559528', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559528', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:08:17] Production.INFO: ProcessCDR(1,14559528,1,1,2)  
[2025-02-26 05:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559528', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559528', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:08:20] Production.INFO: ==29738== Releasing lock...  
[2025-02-26 05:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:08:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:09:05
    [end_date_ymd] => 2025-02-26 05:09:05
    [RateCDR] => 1
)
  
[2025-02-26 05:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:09:05' and `end` < '2025-02-26 05:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:09:17] Production.INFO: count ==104  
[2025-02-26 05:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:09:05 - End Time 2025-02-26 05:09:05  
[2025-02-26 05:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559533', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559533', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:09:17] Production.INFO: ProcessCDR(1,14559533,1,1,2)  
[2025-02-26 05:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:09:20] Production.INFO: ==29810== Releasing lock...  
[2025-02-26 05:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:09:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:10:06
    [end_date_ymd] => 2025-02-26 05:10:06
    [RateCDR] => 1
)
  
[2025-02-26 05:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:10:06' and `end` < '2025-02-26 05:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:10:18] Production.INFO: count ==106  
[2025-02-26 05:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:10:06 - End Time 2025-02-26 05:10:06  
[2025-02-26 05:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559539', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559539', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559539', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559539', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:10:18] Production.INFO: ProcessCDR(1,14559539,1,1,2)  
[2025-02-26 05:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559539', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559539', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:10:21] Production.INFO: ==29890== Releasing lock...  
[2025-02-26 05:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:10:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:11:05
    [end_date_ymd] => 2025-02-26 05:11:05
    [RateCDR] => 1
)
  
[2025-02-26 05:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:11:05' and `end` < '2025-02-26 05:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:11:17] Production.INFO: count ==106  
[2025-02-26 05:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:11:05 - End Time 2025-02-26 05:11:05  
[2025-02-26 05:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559544', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559544', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559544', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559544', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:11:17] Production.INFO: ProcessCDR(1,14559544,1,1,2)  
[2025-02-26 05:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559544', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559544', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:11:20] Production.INFO: ==29969== Releasing lock...  
[2025-02-26 05:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:11:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:12:06
    [end_date_ymd] => 2025-02-26 05:12:06
    [RateCDR] => 1
)
  
[2025-02-26 05:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:12:06' and `end` < '2025-02-26 05:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:12:18] Production.INFO: count ==106  
[2025-02-26 05:12:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:12:06 - End Time 2025-02-26 05:12:06  
[2025-02-26 05:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559549', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559549', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559549', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559549', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:12:18] Production.INFO: ProcessCDR(1,14559549,1,1,2)  
[2025-02-26 05:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559549', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559549', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:12:21] Production.INFO: ==30048== Releasing lock...  
[2025-02-26 05:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:12:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:13:05
    [end_date_ymd] => 2025-02-26 05:13:05
    [RateCDR] => 1
)
  
[2025-02-26 05:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:13:05' and `end` < '2025-02-26 05:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:13:17] Production.INFO: count ==106  
[2025-02-26 05:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:13:05 - End Time 2025-02-26 05:13:05  
[2025-02-26 05:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559554', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559554', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559554', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559554', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:13:17] Production.INFO: ProcessCDR(1,14559554,1,1,2)  
[2025-02-26 05:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559554', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559554', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:13:20] Production.INFO: ==30123== Releasing lock...  
[2025-02-26 05:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:13:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:14:05
    [end_date_ymd] => 2025-02-26 05:14:05
    [RateCDR] => 1
)
  
[2025-02-26 05:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:14:05' and `end` < '2025-02-26 05:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:14:17] Production.INFO: count ==106  
[2025-02-26 05:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:14:05 - End Time 2025-02-26 05:14:05  
[2025-02-26 05:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559559', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559559', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559559', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559559', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:14:17] Production.INFO: ProcessCDR(1,14559559,1,1,2)  
[2025-02-26 05:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:14:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559559', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559559', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:14:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:14:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:14:20] Production.INFO: ==30197== Releasing lock...  
[2025-02-26 05:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:14:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:15:05
    [end_date_ymd] => 2025-02-26 05:15:05
    [RateCDR] => 1
)
  
[2025-02-26 05:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:15:05' and `end` < '2025-02-26 05:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:15:17] Production.INFO: count ==106  
[2025-02-26 05:15:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:15:05 - End Time 2025-02-26 05:15:05  
[2025-02-26 05:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559564', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559564', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559564', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559564', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:15:17] Production.INFO: ProcessCDR(1,14559564,1,1,2)  
[2025-02-26 05:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559564', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559564', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:15:20] Production.INFO: ==30268== Releasing lock...  
[2025-02-26 05:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:15:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:16:06
    [end_date_ymd] => 2025-02-26 05:16:06
    [RateCDR] => 1
)
  
[2025-02-26 05:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:16:06' and `end` < '2025-02-26 05:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:16:17] Production.INFO: count ==106  
[2025-02-26 05:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:16:06 - End Time 2025-02-26 05:16:06  
[2025-02-26 05:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559569', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559569', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559569', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559569', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:16:17] Production.INFO: ProcessCDR(1,14559569,1,1,2)  
[2025-02-26 05:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559569', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559569', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:16:20] Production.INFO: ==30344== Releasing lock...  
[2025-02-26 05:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:16:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:17:05
    [end_date_ymd] => 2025-02-26 05:17:05
    [RateCDR] => 1
)
  
[2025-02-26 05:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:17:05' and `end` < '2025-02-26 05:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:17:16] Production.INFO: count ==106  
[2025-02-26 05:17:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:17:05 - End Time 2025-02-26 05:17:05  
[2025-02-26 05:17:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559574', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559574', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559574', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:17:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559574', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:17:16] Production.INFO: ProcessCDR(1,14559574,1,1,2)  
[2025-02-26 05:17:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:17:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:17:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:17:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:17:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559574', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:17:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559574', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:17:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:17:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:17:19] Production.INFO: ==30420== Releasing lock...  
[2025-02-26 05:17:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:17:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:18:05
    [end_date_ymd] => 2025-02-26 05:18:05
    [RateCDR] => 1
)
  
[2025-02-26 05:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:18:05' and `end` < '2025-02-26 05:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:18:17] Production.INFO: count ==106  
[2025-02-26 05:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:18:05 - End Time 2025-02-26 05:18:05  
[2025-02-26 05:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559579', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559579', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559579', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559579', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:18:17] Production.INFO: ProcessCDR(1,14559579,1,1,2)  
[2025-02-26 05:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559579', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559579', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:18:20] Production.INFO: ==30491== Releasing lock...  
[2025-02-26 05:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:18:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:19:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:19:04
    [end_date_ymd] => 2025-02-26 05:19:04
    [RateCDR] => 1
)
  
[2025-02-26 05:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:19:04' and `end` < '2025-02-26 05:19:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:19:16] Production.INFO: count ==106  
[2025-02-26 05:19:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:19:04 - End Time 2025-02-26 05:19:04  
[2025-02-26 05:19:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:19:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:19:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:19:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559584', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:19:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559584', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:19:16] Production.INFO: ProcessCDR(1,14559584,1,1,2)  
[2025-02-26 05:19:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:19:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:19:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:19:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:19:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:19:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:19:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:19:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:19:19] Production.INFO: ==30565== Releasing lock...  
[2025-02-26 05:19:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:19:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:20:06
    [end_date_ymd] => 2025-02-26 05:20:06
    [RateCDR] => 1
)
  
[2025-02-26 05:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:20:06' and `end` < '2025-02-26 05:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:20:18] Production.INFO: count ==101  
[2025-02-26 05:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:20:06 - End Time 2025-02-26 05:20:06  
[2025-02-26 05:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559589', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559589', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:20:18] Production.INFO: ProcessCDR(1,14559589,1,1,2)  
[2025-02-26 05:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:20:21] Production.INFO: ==30644== Releasing lock...  
[2025-02-26 05:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:20:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:21:05
    [end_date_ymd] => 2025-02-26 05:21:05
    [RateCDR] => 1
)
  
[2025-02-26 05:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:21:05' and `end` < '2025-02-26 05:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:21:16] Production.INFO: count ==101  
[2025-02-26 05:21:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:21:05 - End Time 2025-02-26 05:21:05  
[2025-02-26 05:21:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:21:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559595', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:21:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559595', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:21:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559595', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:21:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559595', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:21:16] Production.INFO: ProcessCDR(1,14559595,1,1,2)  
[2025-02-26 05:21:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:21:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:21:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559595', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559595', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:21:20] Production.INFO: ==30721== Releasing lock...  
[2025-02-26 05:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:21:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:22:05
    [end_date_ymd] => 2025-02-26 05:22:05
    [RateCDR] => 1
)
  
[2025-02-26 05:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:22:05' and `end` < '2025-02-26 05:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:22:17] Production.INFO: count ==101  
[2025-02-26 05:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:22:05 - End Time 2025-02-26 05:22:05  
[2025-02-26 05:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559600', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559600', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559600', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559600', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:22:17] Production.INFO: ProcessCDR(1,14559600,1,1,2)  
[2025-02-26 05:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559600', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559600', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:22:20] Production.INFO: ==30794== Releasing lock...  
[2025-02-26 05:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:22:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:23:06
    [end_date_ymd] => 2025-02-26 05:23:06
    [RateCDR] => 1
)
  
[2025-02-26 05:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:23:06' and `end` < '2025-02-26 05:23:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:23:17] Production.INFO: count ==98  
[2025-02-26 05:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:23:06 - End Time 2025-02-26 05:23:06  
[2025-02-26 05:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559605', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559605', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559605', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559605', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:23:17] Production.INFO: ProcessCDR(1,14559605,1,1,2)  
[2025-02-26 05:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559605', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559605', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:23:21] Production.INFO: ==30872== Releasing lock...  
[2025-02-26 05:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:23:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:24:05
    [end_date_ymd] => 2025-02-26 05:24:05
    [RateCDR] => 1
)
  
[2025-02-26 05:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:24:05' and `end` < '2025-02-26 05:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:24:16] Production.INFO: count ==98  
[2025-02-26 05:24:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:24:05 - End Time 2025-02-26 05:24:05  
[2025-02-26 05:24:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:24:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559610', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:24:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559610', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:24:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559610', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:24:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559610', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:24:16] Production.INFO: ProcessCDR(1,14559610,1,1,2)  
[2025-02-26 05:24:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:24:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559610', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559610', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:24:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:24:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:24:20] Production.INFO: ==30988== Releasing lock...  
[2025-02-26 05:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:24:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:25:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:25:04
    [end_date_ymd] => 2025-02-26 05:25:04
    [RateCDR] => 1
)
  
[2025-02-26 05:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:25:04' and `end` < '2025-02-26 05:25:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:25:16] Production.INFO: count ==98  
[2025-02-26 05:25:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:25:04 - End Time 2025-02-26 05:25:04  
[2025-02-26 05:25:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559615', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559615', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559615', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559615', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:25:16] Production.INFO: ProcessCDR(1,14559615,1,1,2)  
[2025-02-26 05:25:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:25:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:25:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:25:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:25:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559615', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:25:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559615', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:25:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:25:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:25:19] Production.INFO: ==31061== Releasing lock...  
[2025-02-26 05:25:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:25:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:26:05
    [end_date_ymd] => 2025-02-26 05:26:05
    [RateCDR] => 1
)
  
[2025-02-26 05:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:26:05' and `end` < '2025-02-26 05:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:26:17] Production.INFO: count ==98  
[2025-02-26 05:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:26:05 - End Time 2025-02-26 05:26:05  
[2025-02-26 05:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559620', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559620', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559620', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559620', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:26:17] Production.INFO: ProcessCDR(1,14559620,1,1,2)  
[2025-02-26 05:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:26:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559620', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559620', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:26:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:26:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:26:20] Production.INFO: ==31135== Releasing lock...  
[2025-02-26 05:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:26:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:27:05
    [end_date_ymd] => 2025-02-26 05:27:05
    [RateCDR] => 1
)
  
[2025-02-26 05:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:27:05' and `end` < '2025-02-26 05:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:27:17] Production.INFO: count ==98  
[2025-02-26 05:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:27:05 - End Time 2025-02-26 05:27:05  
[2025-02-26 05:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559625', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559625', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559625', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559625', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:27:17] Production.INFO: ProcessCDR(1,14559625,1,1,2)  
[2025-02-26 05:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559625', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559625', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:27:20] Production.INFO: ==31215== Releasing lock...  
[2025-02-26 05:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:27:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:28:05
    [end_date_ymd] => 2025-02-26 05:28:05
    [RateCDR] => 1
)
  
[2025-02-26 05:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:28:05' and `end` < '2025-02-26 05:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:28:17] Production.INFO: count ==98  
[2025-02-26 05:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:28:05 - End Time 2025-02-26 05:28:05  
[2025-02-26 05:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559630', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559630', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:28:17] Production.INFO: ProcessCDR(1,14559630,1,1,2)  
[2025-02-26 05:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:28:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:28:20] Production.INFO: ==31292== Releasing lock...  
[2025-02-26 05:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:28:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:29:05
    [end_date_ymd] => 2025-02-26 05:29:05
    [RateCDR] => 1
)
  
[2025-02-26 05:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:29:05' and `end` < '2025-02-26 05:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:29:17] Production.INFO: count ==98  
[2025-02-26 05:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:29:05 - End Time 2025-02-26 05:29:05  
[2025-02-26 05:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559635', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559635', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:29:17] Production.INFO: ProcessCDR(1,14559635,1,1,2)  
[2025-02-26 05:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:29:20] Production.INFO: ==31370== Releasing lock...  
[2025-02-26 05:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:29:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:30:05
    [end_date_ymd] => 2025-02-26 05:30:05
    [RateCDR] => 1
)
  
[2025-02-26 05:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:30:05' and `end` < '2025-02-26 05:30:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:30:17] Production.INFO: count ==99  
[2025-02-26 05:30:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:30:05 - End Time 2025-02-26 05:30:05  
[2025-02-26 05:30:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:30:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:30:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:30:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559640', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:30:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559640', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:30:17] Production.INFO: ProcessCDR(1,14559640,1,1,2)  
[2025-02-26 05:30:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:30:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:30:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:30:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:30:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:30:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:30:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:30:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:30:20] Production.INFO: ==31444== Releasing lock...  
[2025-02-26 05:30:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:30:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:31:05
    [end_date_ymd] => 2025-02-26 05:31:05
    [RateCDR] => 1
)
  
[2025-02-26 05:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:31:05' and `end` < '2025-02-26 05:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:31:17] Production.INFO: count ==103  
[2025-02-26 05:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:31:05 - End Time 2025-02-26 05:31:05  
[2025-02-26 05:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559646', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559646', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559646', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559646', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:31:17] Production.INFO: ProcessCDR(1,14559646,1,1,2)  
[2025-02-26 05:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559646', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559646', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:31:20] Production.INFO: ==31521== Releasing lock...  
[2025-02-26 05:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:31:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:32:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:32:04
    [end_date_ymd] => 2025-02-26 05:32:04
    [RateCDR] => 1
)
  
[2025-02-26 05:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:32:04' and `end` < '2025-02-26 05:32:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:32:16] Production.INFO: count ==103  
[2025-02-26 05:32:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:32:04 - End Time 2025-02-26 05:32:04  
[2025-02-26 05:32:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:32:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559651', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:32:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559651', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:32:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559651', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:32:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559651', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:32:16] Production.INFO: ProcessCDR(1,14559651,1,1,2)  
[2025-02-26 05:32:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:32:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:32:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:32:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:32:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559651', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:32:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559651', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:32:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:32:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:32:20] Production.INFO: ==31594== Releasing lock...  
[2025-02-26 05:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:32:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:33:05
    [end_date_ymd] => 2025-02-26 05:33:05
    [RateCDR] => 1
)
  
[2025-02-26 05:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:33:05' and `end` < '2025-02-26 05:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:33:17] Production.INFO: count ==103  
[2025-02-26 05:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:33:05 - End Time 2025-02-26 05:33:05  
[2025-02-26 05:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559656', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559656', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559656', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559656', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:33:17] Production.INFO: ProcessCDR(1,14559656,1,1,2)  
[2025-02-26 05:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559656', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559656', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:33:20] Production.INFO: ==31668== Releasing lock...  
[2025-02-26 05:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:33:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:34:05
    [end_date_ymd] => 2025-02-26 05:34:05
    [RateCDR] => 1
)
  
[2025-02-26 05:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:34:05' and `end` < '2025-02-26 05:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:34:17] Production.INFO: count ==98  
[2025-02-26 05:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:34:05 - End Time 2025-02-26 05:34:05  
[2025-02-26 05:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559661', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559661', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559661', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559661', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:34:17] Production.INFO: ProcessCDR(1,14559661,1,1,2)  
[2025-02-26 05:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:34:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559661', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559661', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:34:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:34:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:34:20] Production.INFO: ==31742== Releasing lock...  
[2025-02-26 05:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:34:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:35:05
    [end_date_ymd] => 2025-02-26 05:35:05
    [RateCDR] => 1
)
  
[2025-02-26 05:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:35:05' and `end` < '2025-02-26 05:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:35:16] Production.INFO: count ==98  
[2025-02-26 05:35:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:35:05 - End Time 2025-02-26 05:35:05  
[2025-02-26 05:35:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559666', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559666', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559666', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:35:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559666', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:35:16] Production.INFO: ProcessCDR(1,14559666,1,1,2)  
[2025-02-26 05:35:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:35:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:35:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559666', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559666', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:35:20] Production.INFO: ==31818== Releasing lock...  
[2025-02-26 05:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:35:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:36:05
    [end_date_ymd] => 2025-02-26 05:36:05
    [RateCDR] => 1
)
  
[2025-02-26 05:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:36:05' and `end` < '2025-02-26 05:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:36:17] Production.INFO: count ==98  
[2025-02-26 05:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:36:05 - End Time 2025-02-26 05:36:05  
[2025-02-26 05:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559671', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559671', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559671', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559671', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:36:17] Production.INFO: ProcessCDR(1,14559671,1,1,2)  
[2025-02-26 05:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:36:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559671', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559671', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:36:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:36:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:36:20] Production.INFO: ==31892== Releasing lock...  
[2025-02-26 05:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:36:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:37:05
    [end_date_ymd] => 2025-02-26 05:37:05
    [RateCDR] => 1
)
  
[2025-02-26 05:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:37:05' and `end` < '2025-02-26 05:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:37:17] Production.INFO: count ==98  
[2025-02-26 05:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:37:05 - End Time 2025-02-26 05:37:05  
[2025-02-26 05:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559676', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559676', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559676', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559676', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:37:17] Production.INFO: ProcessCDR(1,14559676,1,1,2)  
[2025-02-26 05:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559676', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559676', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:37:20] Production.INFO: ==31960== Releasing lock...  
[2025-02-26 05:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:37:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:38:05
    [end_date_ymd] => 2025-02-26 05:38:05
    [RateCDR] => 1
)
  
[2025-02-26 05:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:38:05' and `end` < '2025-02-26 05:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:38:17] Production.INFO: count ==98  
[2025-02-26 05:38:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:38:05 - End Time 2025-02-26 05:38:05  
[2025-02-26 05:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559681', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559681', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559681', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559681', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:38:17] Production.INFO: ProcessCDR(1,14559681,1,1,2)  
[2025-02-26 05:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559681', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559681', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:38:20] Production.INFO: ==32035== Releasing lock...  
[2025-02-26 05:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:38:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:39:05
    [end_date_ymd] => 2025-02-26 05:39:05
    [RateCDR] => 1
)
  
[2025-02-26 05:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:39:05' and `end` < '2025-02-26 05:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:39:17] Production.INFO: count ==98  
[2025-02-26 05:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:39:05 - End Time 2025-02-26 05:39:05  
[2025-02-26 05:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559686', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559686', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:39:17] Production.INFO: ProcessCDR(1,14559686,1,1,2)  
[2025-02-26 05:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:39:20] Production.INFO: ==32153== Releasing lock...  
[2025-02-26 05:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:39:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:40:06
    [end_date_ymd] => 2025-02-26 05:40:06
    [RateCDR] => 1
)
  
[2025-02-26 05:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:40:06' and `end` < '2025-02-26 05:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:40:17] Production.INFO: count ==99  
[2025-02-26 05:40:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:40:06 - End Time 2025-02-26 05:40:06  
[2025-02-26 05:40:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559691', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559691', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:40:17] Production.INFO: ProcessCDR(1,14559691,1,1,2)  
[2025-02-26 05:40:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:40:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:40:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:40:21] Production.INFO: ==32230== Releasing lock...  
[2025-02-26 05:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:40:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:41:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:41:04
    [end_date_ymd] => 2025-02-26 05:41:04
    [RateCDR] => 1
)
  
[2025-02-26 05:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:41:04' and `end` < '2025-02-26 05:41:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:41:16] Production.INFO: count ==99  
[2025-02-26 05:41:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:41:04 - End Time 2025-02-26 05:41:04  
[2025-02-26 05:41:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:41:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559697', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:41:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559697', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:41:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559697', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:41:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559697', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:41:16] Production.INFO: ProcessCDR(1,14559697,1,1,2)  
[2025-02-26 05:41:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:41:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:41:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:41:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:41:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559697', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:41:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559697', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:41:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:41:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:41:19] Production.INFO: ==32310== Releasing lock...  
[2025-02-26 05:41:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:41:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:42:05
    [end_date_ymd] => 2025-02-26 05:42:05
    [RateCDR] => 1
)
  
[2025-02-26 05:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:42:05' and `end` < '2025-02-26 05:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:42:17] Production.INFO: count ==99  
[2025-02-26 05:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:42:05 - End Time 2025-02-26 05:42:05  
[2025-02-26 05:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559702', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559702', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559702', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559702', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:42:17] Production.INFO: ProcessCDR(1,14559702,1,1,2)  
[2025-02-26 05:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559702', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559702', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:42:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:42:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:42:20] Production.INFO: ==32386== Releasing lock...  
[2025-02-26 05:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:42:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:43:06
    [end_date_ymd] => 2025-02-26 05:43:06
    [RateCDR] => 1
)
  
[2025-02-26 05:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:43:06' and `end` < '2025-02-26 05:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:43:17] Production.INFO: count ==99  
[2025-02-26 05:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:43:06 - End Time 2025-02-26 05:43:06  
[2025-02-26 05:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559707', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559707', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559707', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559707', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:43:17] Production.INFO: ProcessCDR(1,14559707,1,1,2)  
[2025-02-26 05:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:43:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559707', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559707', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:43:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:43:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:43:20] Production.INFO: ==32456== Releasing lock...  
[2025-02-26 05:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:43:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:44:05
    [end_date_ymd] => 2025-02-26 05:44:05
    [RateCDR] => 1
)
  
[2025-02-26 05:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:44:05' and `end` < '2025-02-26 05:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:44:17] Production.INFO: count ==99  
[2025-02-26 05:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:44:05 - End Time 2025-02-26 05:44:05  
[2025-02-26 05:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559712', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559712', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559712', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559712', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:44:17] Production.INFO: ProcessCDR(1,14559712,1,1,2)  
[2025-02-26 05:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559712', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559712', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:44:20] Production.INFO: ==32527== Releasing lock...  
[2025-02-26 05:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:44:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:45:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:45:04
    [end_date_ymd] => 2025-02-26 05:45:04
    [RateCDR] => 1
)
  
[2025-02-26 05:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:45:04' and `end` < '2025-02-26 05:45:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:45:16] Production.INFO: count ==99  
[2025-02-26 05:45:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:45:04 - End Time 2025-02-26 05:45:04  
[2025-02-26 05:45:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559717', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559717', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559717', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:45:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559717', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:45:16] Production.INFO: ProcessCDR(1,14559717,1,1,2)  
[2025-02-26 05:45:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:45:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:45:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:45:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:45:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559717', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:45:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559717', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:45:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:45:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:45:19] Production.INFO: ==32596== Releasing lock...  
[2025-02-26 05:45:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:45:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:46:06
    [end_date_ymd] => 2025-02-26 05:46:06
    [RateCDR] => 1
)
  
[2025-02-26 05:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:46:06' and `end` < '2025-02-26 05:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:46:17] Production.INFO: count ==99  
[2025-02-26 05:46:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:46:06 - End Time 2025-02-26 05:46:06  
[2025-02-26 05:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559722', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559722', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559722', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559722', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:46:17] Production.INFO: ProcessCDR(1,14559722,1,1,2)  
[2025-02-26 05:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559722', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559722', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:46:21] Production.INFO: ==32670== Releasing lock...  
[2025-02-26 05:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:46:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:47:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:47:04
    [end_date_ymd] => 2025-02-26 05:47:04
    [RateCDR] => 1
)
  
[2025-02-26 05:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:47:04' and `end` < '2025-02-26 05:47:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:47:16] Production.INFO: count ==99  
[2025-02-26 05:47:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:47:04 - End Time 2025-02-26 05:47:04  
[2025-02-26 05:47:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:47:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559727', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:47:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559727', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:47:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559727', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:47:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559727', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:47:16] Production.INFO: ProcessCDR(1,14559727,1,1,2)  
[2025-02-26 05:47:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:47:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:47:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:47:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:47:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559727', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:47:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559727', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:47:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:47:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:47:19] Production.INFO: ==32744== Releasing lock...  
[2025-02-26 05:47:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:47:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:48:05
    [end_date_ymd] => 2025-02-26 05:48:05
    [RateCDR] => 1
)
  
[2025-02-26 05:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:48:05' and `end` < '2025-02-26 05:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:48:17] Production.INFO: count ==99  
[2025-02-26 05:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:48:05 - End Time 2025-02-26 05:48:05  
[2025-02-26 05:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559732', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559732', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:48:17] Production.INFO: ProcessCDR(1,14559732,1,1,2)  
[2025-02-26 05:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:48:20] Production.INFO: ==367== Releasing lock...  
[2025-02-26 05:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:48:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:49:06
    [end_date_ymd] => 2025-02-26 05:49:06
    [RateCDR] => 1
)
  
[2025-02-26 05:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:49:06' and `end` < '2025-02-26 05:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:49:17] Production.INFO: count ==99  
[2025-02-26 05:49:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:49:06 - End Time 2025-02-26 05:49:06  
[2025-02-26 05:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559737', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559737', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:49:17] Production.INFO: ProcessCDR(1,14559737,1,1,2)  
[2025-02-26 05:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:49:20] Production.INFO: ==447== Releasing lock...  
[2025-02-26 05:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:49:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:50:06
    [end_date_ymd] => 2025-02-26 05:50:06
    [RateCDR] => 1
)
  
[2025-02-26 05:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:50:06' and `end` < '2025-02-26 05:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:50:18] Production.INFO: count ==103  
[2025-02-26 05:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:50:06 - End Time 2025-02-26 05:50:06  
[2025-02-26 05:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559743', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559743', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559743', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559743', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:50:18] Production.INFO: ProcessCDR(1,14559743,1,1,2)  
[2025-02-26 05:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559743', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559743', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:50:21] Production.INFO: ==522== Releasing lock...  
[2025-02-26 05:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:50:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:51:06
    [end_date_ymd] => 2025-02-26 05:51:06
    [RateCDR] => 1
)
  
[2025-02-26 05:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:51:06' and `end` < '2025-02-26 05:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:51:18] Production.INFO: count ==103  
[2025-02-26 05:51:18] Production.ERROR: pbx CDR StartTime 2025-02-26 02:51:06 - End Time 2025-02-26 05:51:06  
[2025-02-26 05:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559748', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559748', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559748', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559748', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:51:18] Production.INFO: ProcessCDR(1,14559748,1,1,2)  
[2025-02-26 05:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559748', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559748', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:51:21] Production.INFO: ==598== Releasing lock...  
[2025-02-26 05:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:51:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:52:05
    [end_date_ymd] => 2025-02-26 05:52:05
    [RateCDR] => 1
)
  
[2025-02-26 05:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:52:05' and `end` < '2025-02-26 05:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:52:17] Production.INFO: count ==103  
[2025-02-26 05:52:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:52:05 - End Time 2025-02-26 05:52:05  
[2025-02-26 05:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559753', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559753', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559753', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559753', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:52:17] Production.INFO: ProcessCDR(1,14559753,1,1,2)  
[2025-02-26 05:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:52:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559753', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559753', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:52:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:52:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:52:20] Production.INFO: ==696== Releasing lock...  
[2025-02-26 05:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:52:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:53:05
    [end_date_ymd] => 2025-02-26 05:53:05
    [RateCDR] => 1
)
  
[2025-02-26 05:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:53:05' and `end` < '2025-02-26 05:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:53:17] Production.INFO: count ==103  
[2025-02-26 05:53:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:53:05 - End Time 2025-02-26 05:53:05  
[2025-02-26 05:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559758', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559758', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559758', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559758', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:53:17] Production.INFO: ProcessCDR(1,14559758,1,1,2)  
[2025-02-26 05:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:53:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559758', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559758', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:53:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:53:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:53:20] Production.INFO: ==774== Releasing lock...  
[2025-02-26 05:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:53:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:54:05
    [end_date_ymd] => 2025-02-26 05:54:05
    [RateCDR] => 1
)
  
[2025-02-26 05:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:54:05' and `end` < '2025-02-26 05:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:54:17] Production.INFO: count ==103  
[2025-02-26 05:54:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:54:05 - End Time 2025-02-26 05:54:05  
[2025-02-26 05:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559763', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559763', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559763', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559763', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:54:17] Production.INFO: ProcessCDR(1,14559763,1,1,2)  
[2025-02-26 05:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:54:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559763', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559763', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:54:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:54:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:54:20] Production.INFO: ==846== Releasing lock...  
[2025-02-26 05:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:54:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:55:05
    [end_date_ymd] => 2025-02-26 05:55:05
    [RateCDR] => 1
)
  
[2025-02-26 05:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:55:05' and `end` < '2025-02-26 05:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:55:17] Production.INFO: count ==103  
[2025-02-26 05:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:55:05 - End Time 2025-02-26 05:55:05  
[2025-02-26 05:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559768', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559768', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559768', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559768', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:55:17] Production.INFO: ProcessCDR(1,14559768,1,1,2)  
[2025-02-26 05:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559768', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559768', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:55:20] Production.INFO: ==962== Releasing lock...  
[2025-02-26 05:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:55:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:56:05
    [end_date_ymd] => 2025-02-26 05:56:05
    [RateCDR] => 1
)
  
[2025-02-26 05:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:56:05' and `end` < '2025-02-26 05:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:56:17] Production.INFO: count ==103  
[2025-02-26 05:56:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:56:05 - End Time 2025-02-26 05:56:05  
[2025-02-26 05:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559773', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559773', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559773', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559773', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:56:17] Production.INFO: ProcessCDR(1,14559773,1,1,2)  
[2025-02-26 05:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:56:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559773', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559773', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:56:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:56:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:56:20] Production.INFO: ==1036== Releasing lock...  
[2025-02-26 05:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:56:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:57:05
    [end_date_ymd] => 2025-02-26 05:57:05
    [RateCDR] => 1
)
  
[2025-02-26 05:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:57:05' and `end` < '2025-02-26 05:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:57:17] Production.INFO: count ==103  
[2025-02-26 05:57:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:57:05 - End Time 2025-02-26 05:57:05  
[2025-02-26 05:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559778', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559778', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559778', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559778', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:57:17] Production.INFO: ProcessCDR(1,14559778,1,1,2)  
[2025-02-26 05:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559778', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559778', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:57:20] Production.INFO: ==1106== Releasing lock...  
[2025-02-26 05:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:57:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:58:05
    [end_date_ymd] => 2025-02-26 05:58:05
    [RateCDR] => 1
)
  
[2025-02-26 05:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:58:05' and `end` < '2025-02-26 05:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:58:16] Production.INFO: count ==103  
[2025-02-26 05:58:16] Production.ERROR: pbx CDR StartTime 2025-02-26 02:58:05 - End Time 2025-02-26 05:58:05  
[2025-02-26 05:58:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:58:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:58:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:58:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559783', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:58:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559783', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:58:16] Production.INFO: ProcessCDR(1,14559783,1,1,2)  
[2025-02-26 05:58:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:58:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:58:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:58:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:58:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:58:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:58:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:58:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:58:19] Production.INFO: ==1184== Releasing lock...  
[2025-02-26 05:58:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:58:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 05:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 02:59:05
    [end_date_ymd] => 2025-02-26 05:59:05
    [RateCDR] => 1
)
  
[2025-02-26 05:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 02:59:05' and `end` < '2025-02-26 05:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 05:59:17] Production.INFO: count ==104  
[2025-02-26 05:59:17] Production.ERROR: pbx CDR StartTime 2025-02-26 02:59:05 - End Time 2025-02-26 05:59:05  
[2025-02-26 05:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559788', 'tblTempVendorCDR_20' ) start  
[2025-02-26 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559788', 'tblTempVendorCDR_20' ) end  
[2025-02-26 05:59:17] Production.INFO: ProcessCDR(1,14559788,1,1,2)  
[2025-02-26 05:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 05:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 05:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 05:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 05:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 05:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 05:59:21] Production.INFO: ==1270== Releasing lock...  
[2025-02-26 05:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 05:59:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:00:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:00:05
    [end_date_ymd] => 2025-02-26 06:00:05
    [RateCDR] => 1
)
  
[2025-02-26 06:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:00:05' and `end` < '2025-02-26 06:00:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:00:17] Production.INFO: count ==112  
[2025-02-26 06:00:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:00:05 - End Time 2025-02-26 06:00:05  
[2025-02-26 06:00:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:00:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:00:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:00:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559793', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:00:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559793', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:00:17] Production.INFO: ProcessCDR(1,14559793,1,1,2)  
[2025-02-26 06:00:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:00:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:00:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:00:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:00:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:00:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:00:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:00:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:00:20] Production.INFO: ==1346== Releasing lock...  
[2025-02-26 06:00:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:00:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:01:05
    [end_date_ymd] => 2025-02-26 06:01:05
    [RateCDR] => 1
)
  
[2025-02-26 06:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:01:05' and `end` < '2025-02-26 06:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:01:17] Production.INFO: count ==116  
[2025-02-26 06:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:01:05 - End Time 2025-02-26 06:01:05  
[2025-02-26 06:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559799', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559799', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559799', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559799', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:01:17] Production.INFO: ProcessCDR(1,14559799,1,1,2)  
[2025-02-26 06:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559799', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559799', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:01:21] Production.INFO: ==1430== Releasing lock...  
[2025-02-26 06:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:01:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:02:06
    [end_date_ymd] => 2025-02-26 06:02:06
    [RateCDR] => 1
)
  
[2025-02-26 06:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:02:06' and `end` < '2025-02-26 06:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:02:18] Production.INFO: count ==116  
[2025-02-26 06:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:02:06 - End Time 2025-02-26 06:02:06  
[2025-02-26 06:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559804', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559804', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559804', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559804', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:02:18] Production.INFO: ProcessCDR(1,14559804,1,1,2)  
[2025-02-26 06:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559804', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559804', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:02:22] Production.INFO: ==1501== Releasing lock...  
[2025-02-26 06:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:02:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:03:06
    [end_date_ymd] => 2025-02-26 06:03:06
    [RateCDR] => 1
)
  
[2025-02-26 06:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:03:06' and `end` < '2025-02-26 06:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:03:18] Production.INFO: count ==116  
[2025-02-26 06:03:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:03:06 - End Time 2025-02-26 06:03:06  
[2025-02-26 06:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559809', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559809', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559809', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559809', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:03:18] Production.INFO: ProcessCDR(1,14559809,1,1,2)  
[2025-02-26 06:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559809', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559809', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:03:21] Production.INFO: ==1609== Releasing lock...  
[2025-02-26 06:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:03:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:04:05
    [end_date_ymd] => 2025-02-26 06:04:05
    [RateCDR] => 1
)
  
[2025-02-26 06:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:04:05' and `end` < '2025-02-26 06:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:04:17] Production.INFO: count ==116  
[2025-02-26 06:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:04:05 - End Time 2025-02-26 06:04:05  
[2025-02-26 06:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559814', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559814', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559814', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559814', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:04:17] Production.INFO: ProcessCDR(1,14559814,1,1,2)  
[2025-02-26 06:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559814', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559814', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:04:21] Production.INFO: ==1681== Releasing lock...  
[2025-02-26 06:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:04:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:05:06
    [end_date_ymd] => 2025-02-26 06:05:06
    [RateCDR] => 1
)
  
[2025-02-26 06:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:05:06' and `end` < '2025-02-26 06:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:05:17] Production.INFO: count ==116  
[2025-02-26 06:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:05:06 - End Time 2025-02-26 06:05:06  
[2025-02-26 06:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559819', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559819', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559819', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559819', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:05:17] Production.INFO: ProcessCDR(1,14559819,1,1,2)  
[2025-02-26 06:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559819', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559819', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:05:21] Production.INFO: ==1752== Releasing lock...  
[2025-02-26 06:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:05:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:06:05
    [end_date_ymd] => 2025-02-26 06:06:05
    [RateCDR] => 1
)
  
[2025-02-26 06:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:06:05' and `end` < '2025-02-26 06:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:06:17] Production.INFO: count ==116  
[2025-02-26 06:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:06:05 - End Time 2025-02-26 06:06:05  
[2025-02-26 06:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559824', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559824', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559824', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559824', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:06:17] Production.INFO: ProcessCDR(1,14559824,1,1,2)  
[2025-02-26 06:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559824', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559824', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:06:21] Production.INFO: ==1829== Releasing lock...  
[2025-02-26 06:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:06:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:07:06
    [end_date_ymd] => 2025-02-26 06:07:06
    [RateCDR] => 1
)
  
[2025-02-26 06:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:07:06' and `end` < '2025-02-26 06:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:07:18] Production.INFO: count ==116  
[2025-02-26 06:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:07:06 - End Time 2025-02-26 06:07:06  
[2025-02-26 06:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559829', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559829', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559829', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559829', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:07:18] Production.INFO: ProcessCDR(1,14559829,1,1,2)  
[2025-02-26 06:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559829', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559829', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:07:21] Production.INFO: ==1899== Releasing lock...  
[2025-02-26 06:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:07:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:08:05
    [end_date_ymd] => 2025-02-26 06:08:05
    [RateCDR] => 1
)
  
[2025-02-26 06:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:08:05' and `end` < '2025-02-26 06:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:08:17] Production.INFO: count ==116  
[2025-02-26 06:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:08:05 - End Time 2025-02-26 06:08:05  
[2025-02-26 06:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559834', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559834', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:08:17] Production.INFO: ProcessCDR(1,14559834,1,1,2)  
[2025-02-26 06:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:08:20] Production.INFO: ==1974== Releasing lock...  
[2025-02-26 06:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:08:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:09:05
    [end_date_ymd] => 2025-02-26 06:09:05
    [RateCDR] => 1
)
  
[2025-02-26 06:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:09:05' and `end` < '2025-02-26 06:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:09:17] Production.INFO: count ==116  
[2025-02-26 06:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:09:05 - End Time 2025-02-26 06:09:05  
[2025-02-26 06:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559839', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559839', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:09:17] Production.INFO: ProcessCDR(1,14559839,1,1,2)  
[2025-02-26 06:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:09:20] Production.INFO: ==2045== Releasing lock...  
[2025-02-26 06:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:09:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:10:05
    [end_date_ymd] => 2025-02-26 06:10:05
    [RateCDR] => 1
)
  
[2025-02-26 06:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:10:05' and `end` < '2025-02-26 06:10:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:10:17] Production.INFO: count ==120  
[2025-02-26 06:10:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:10:05 - End Time 2025-02-26 06:10:05  
[2025-02-26 06:10:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559845', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559845', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559845', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:10:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559845', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:10:17] Production.INFO: ProcessCDR(1,14559845,1,1,2)  
[2025-02-26 06:10:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:10:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:10:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:10:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:10:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559845', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:10:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559845', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:10:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:10:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:10:20] Production.INFO: ==2165== Releasing lock...  
[2025-02-26 06:10:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:10:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:11:06
    [end_date_ymd] => 2025-02-26 06:11:06
    [RateCDR] => 1
)
  
[2025-02-26 06:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:11:06' and `end` < '2025-02-26 06:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:11:17] Production.INFO: count ==120  
[2025-02-26 06:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:11:06 - End Time 2025-02-26 06:11:06  
[2025-02-26 06:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559850', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559850', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559850', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559850', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:11:17] Production.INFO: ProcessCDR(1,14559850,1,1,2)  
[2025-02-26 06:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559850', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559850', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:11:20] Production.INFO: ==2246== Releasing lock...  
[2025-02-26 06:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:11:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:12:05
    [end_date_ymd] => 2025-02-26 06:12:05
    [RateCDR] => 1
)
  
[2025-02-26 06:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:12:05' and `end` < '2025-02-26 06:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:12:17] Production.INFO: count ==120  
[2025-02-26 06:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:12:05 - End Time 2025-02-26 06:12:05  
[2025-02-26 06:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559855', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559855', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559855', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559855', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:12:17] Production.INFO: ProcessCDR(1,14559855,1,1,2)  
[2025-02-26 06:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559855', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559855', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:12:20] Production.INFO: ==2317== Releasing lock...  
[2025-02-26 06:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:12:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:13:05
    [end_date_ymd] => 2025-02-26 06:13:05
    [RateCDR] => 1
)
  
[2025-02-26 06:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:13:05' and `end` < '2025-02-26 06:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:13:17] Production.INFO: count ==120  
[2025-02-26 06:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:13:05 - End Time 2025-02-26 06:13:05  
[2025-02-26 06:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559860', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559860', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559860', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559860', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:13:17] Production.INFO: ProcessCDR(1,14559860,1,1,2)  
[2025-02-26 06:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559860', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559860', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:13:20] Production.INFO: ==2389== Releasing lock...  
[2025-02-26 06:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:13:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:14:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:14:04
    [end_date_ymd] => 2025-02-26 06:14:04
    [RateCDR] => 1
)
  
[2025-02-26 06:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:14:04' and `end` < '2025-02-26 06:14:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:14:16] Production.INFO: count ==120  
[2025-02-26 06:14:16] Production.ERROR: pbx CDR StartTime 2025-02-26 03:14:04 - End Time 2025-02-26 06:14:04  
[2025-02-26 06:14:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:14:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559865', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:14:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559865', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:14:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559865', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:14:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559865', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:14:16] Production.INFO: ProcessCDR(1,14559865,1,1,2)  
[2025-02-26 06:14:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:14:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:14:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:14:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:14:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559865', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:14:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559865', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:14:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:14:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:14:19] Production.INFO: ==2459== Releasing lock...  
[2025-02-26 06:14:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:14:19] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:15:05
    [end_date_ymd] => 2025-02-26 06:15:05
    [RateCDR] => 1
)
  
[2025-02-26 06:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:15:05' and `end` < '2025-02-26 06:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:15:17] Production.INFO: count ==124  
[2025-02-26 06:15:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:15:05 - End Time 2025-02-26 06:15:05  
[2025-02-26 06:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559870', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559870', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559870', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559870', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:15:17] Production.INFO: ProcessCDR(1,14559870,1,1,2)  
[2025-02-26 06:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559870', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559870', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:15:20] Production.INFO: ==2531== Releasing lock...  
[2025-02-26 06:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:15:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:16:06
    [end_date_ymd] => 2025-02-26 06:16:06
    [RateCDR] => 1
)
  
[2025-02-26 06:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:16:06' and `end` < '2025-02-26 06:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:16:17] Production.INFO: count ==124  
[2025-02-26 06:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:16:06 - End Time 2025-02-26 06:16:06  
[2025-02-26 06:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559875', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559875', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559875', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559875', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:16:17] Production.INFO: ProcessCDR(1,14559875,1,1,2)  
[2025-02-26 06:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559875', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559875', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:16:20] Production.INFO: ==2602== Releasing lock...  
[2025-02-26 06:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:16:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:17:05
    [end_date_ymd] => 2025-02-26 06:17:05
    [RateCDR] => 1
)
  
[2025-02-26 06:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:17:05' and `end` < '2025-02-26 06:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:17:17] Production.INFO: count ==124  
[2025-02-26 06:17:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:17:05 - End Time 2025-02-26 06:17:05  
[2025-02-26 06:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559880', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559880', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559880', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559880', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:17:17] Production.INFO: ProcessCDR(1,14559880,1,1,2)  
[2025-02-26 06:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:17:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559880', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559880', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:17:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:17:20] Production.INFO: ==2672== Releasing lock...  
[2025-02-26 06:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:17:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-02-26 06:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:18:05
    [end_date_ymd] => 2025-02-26 06:18:05
    [RateCDR] => 1
)
  
[2025-02-26 06:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:18:05' and `end` < '2025-02-26 06:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:18:17] Production.INFO: count ==132  
[2025-02-26 06:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:18:05 - End Time 2025-02-26 06:18:05  
[2025-02-26 06:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559885', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559885', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:18:17] Production.INFO: ProcessCDR(1,14559885,1,1,2)  
[2025-02-26 06:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:18:20] Production.INFO: ==2744== Releasing lock...  
[2025-02-26 06:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:18:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:19:05
    [end_date_ymd] => 2025-02-26 06:19:05
    [RateCDR] => 1
)
  
[2025-02-26 06:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:19:05' and `end` < '2025-02-26 06:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:19:17] Production.INFO: count ==132  
[2025-02-26 06:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:19:05 - End Time 2025-02-26 06:19:05  
[2025-02-26 06:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559890', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559890', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:19:17] Production.INFO: ProcessCDR(1,14559890,1,1,2)  
[2025-02-26 06:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:19:20] Production.INFO: ==2818== Releasing lock...  
[2025-02-26 06:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:19:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:20:06
    [end_date_ymd] => 2025-02-26 06:20:06
    [RateCDR] => 1
)
  
[2025-02-26 06:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:20:06' and `end` < '2025-02-26 06:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:20:18] Production.INFO: count ==138  
[2025-02-26 06:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:20:06 - End Time 2025-02-26 06:20:06  
[2025-02-26 06:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559896', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559896', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559896', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559896', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:20:18] Production.INFO: ProcessCDR(1,14559896,1,1,2)  
[2025-02-26 06:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559896', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559896', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:20:21] Production.INFO: ==2890== Releasing lock...  
[2025-02-26 06:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:20:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:21:05
    [end_date_ymd] => 2025-02-26 06:21:05
    [RateCDR] => 1
)
  
[2025-02-26 06:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:21:05' and `end` < '2025-02-26 06:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:21:17] Production.INFO: count ==138  
[2025-02-26 06:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:21:05 - End Time 2025-02-26 06:21:05  
[2025-02-26 06:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559901', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559901', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559901', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559901', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:21:17] Production.INFO: ProcessCDR(1,14559901,1,1,2)  
[2025-02-26 06:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559901', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559901', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:21:20] Production.INFO: ==2981== Releasing lock...  
[2025-02-26 06:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:21:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:22:05
    [end_date_ymd] => 2025-02-26 06:22:05
    [RateCDR] => 1
)
  
[2025-02-26 06:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:22:05' and `end` < '2025-02-26 06:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:22:17] Production.INFO: count ==138  
[2025-02-26 06:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:22:05 - End Time 2025-02-26 06:22:05  
[2025-02-26 06:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559906', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559906', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559906', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559906', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:22:17] Production.INFO: ProcessCDR(1,14559906,1,1,2)  
[2025-02-26 06:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559906', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559906', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:22:20] Production.INFO: ==3083== Releasing lock...  
[2025-02-26 06:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:22:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:23:05
    [end_date_ymd] => 2025-02-26 06:23:05
    [RateCDR] => 1
)
  
[2025-02-26 06:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:23:05' and `end` < '2025-02-26 06:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:23:17] Production.INFO: count ==138  
[2025-02-26 06:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:23:05 - End Time 2025-02-26 06:23:05  
[2025-02-26 06:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559911', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559911', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559911', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559911', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:23:17] Production.INFO: ProcessCDR(1,14559911,1,1,2)  
[2025-02-26 06:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:23:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559911', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:23:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559911', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:23:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:23:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:23:20] Production.INFO: ==3184== Releasing lock...  
[2025-02-26 06:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:23:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:24:06
    [end_date_ymd] => 2025-02-26 06:24:06
    [RateCDR] => 1
)
  
[2025-02-26 06:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:24:06' and `end` < '2025-02-26 06:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:24:18] Production.INFO: count ==138  
[2025-02-26 06:24:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:24:06 - End Time 2025-02-26 06:24:06  
[2025-02-26 06:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559916', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559916', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559916', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559916', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:24:18] Production.INFO: ProcessCDR(1,14559916,1,1,2)  
[2025-02-26 06:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559916', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559916', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:24:21] Production.INFO: ==3287== Releasing lock...  
[2025-02-26 06:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:24:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:25:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:25:04
    [end_date_ymd] => 2025-02-26 06:25:04
    [RateCDR] => 1
)
  
[2025-02-26 06:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:25:04' and `end` < '2025-02-26 06:25:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:25:16] Production.INFO: count ==143  
[2025-02-26 06:25:16] Production.ERROR: pbx CDR StartTime 2025-02-26 03:25:04 - End Time 2025-02-26 06:25:04  
[2025-02-26 06:25:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559921', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559921', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559921', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:25:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559921', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:25:16] Production.INFO: ProcessCDR(1,14559921,1,1,2)  
[2025-02-26 06:25:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559921', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559921', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:25:21] Production.INFO: ==3387== Releasing lock...  
[2025-02-26 06:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:25:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-02-26 06:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:26:06
    [end_date_ymd] => 2025-02-26 06:26:06
    [RateCDR] => 1
)
  
[2025-02-26 06:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:26:06' and `end` < '2025-02-26 06:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:26:18] Production.INFO: count ==147  
[2025-02-26 06:26:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:26:06 - End Time 2025-02-26 06:26:06  
[2025-02-26 06:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559926', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559926', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559926', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559926', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:26:18] Production.INFO: ProcessCDR(1,14559926,1,1,2)  
[2025-02-26 06:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559926', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559926', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:26:21] Production.INFO: ==3522== Releasing lock...  
[2025-02-26 06:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:26:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:27:05
    [end_date_ymd] => 2025-02-26 06:27:05
    [RateCDR] => 1
)
  
[2025-02-26 06:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:27:05' and `end` < '2025-02-26 06:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:27:17] Production.INFO: count ==147  
[2025-02-26 06:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:27:05 - End Time 2025-02-26 06:27:05  
[2025-02-26 06:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559931', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559931', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559931', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559931', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:27:17] Production.INFO: ProcessCDR(1,14559931,1,1,2)  
[2025-02-26 06:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559931', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559931', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:27:20] Production.INFO: ==3616== Releasing lock...  
[2025-02-26 06:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:27:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:28:05
    [end_date_ymd] => 2025-02-26 06:28:05
    [RateCDR] => 1
)
  
[2025-02-26 06:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:28:05' and `end` < '2025-02-26 06:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:28:17] Production.INFO: count ==147  
[2025-02-26 06:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:28:05 - End Time 2025-02-26 06:28:05  
[2025-02-26 06:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559936', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559936', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:28:17] Production.INFO: ProcessCDR(1,14559936,1,1,2)  
[2025-02-26 06:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:28:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:28:20] Production.INFO: ==3709== Releasing lock...  
[2025-02-26 06:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:28:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:29:05
    [end_date_ymd] => 2025-02-26 06:29:05
    [RateCDR] => 1
)
  
[2025-02-26 06:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:29:05' and `end` < '2025-02-26 06:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:29:17] Production.INFO: count ==148  
[2025-02-26 06:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:29:05 - End Time 2025-02-26 06:29:05  
[2025-02-26 06:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559941', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559941', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:29:17] Production.INFO: ProcessCDR(1,14559941,1,1,2)  
[2025-02-26 06:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:29:21] Production.INFO: ==3810== Releasing lock...  
[2025-02-26 06:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:29:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:30:06
    [end_date_ymd] => 2025-02-26 06:30:06
    [RateCDR] => 1
)
  
[2025-02-26 06:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:30:06' and `end` < '2025-02-26 06:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:30:18] Production.INFO: count ==156  
[2025-02-26 06:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:30:06 - End Time 2025-02-26 06:30:06  
[2025-02-26 06:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559947', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559947', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559947', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559947', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:30:18] Production.INFO: ProcessCDR(1,14559947,1,1,2)  
[2025-02-26 06:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559947', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559947', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:30:21] Production.INFO: ==3912== Releasing lock...  
[2025-02-26 06:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:30:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:31:05
    [end_date_ymd] => 2025-02-26 06:31:05
    [RateCDR] => 1
)
  
[2025-02-26 06:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:31:05' and `end` < '2025-02-26 06:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:31:17] Production.INFO: count ==161  
[2025-02-26 06:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:31:05 - End Time 2025-02-26 06:31:05  
[2025-02-26 06:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559952', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559952', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559952', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559952', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:31:17] Production.INFO: ProcessCDR(1,14559952,1,1,2)  
[2025-02-26 06:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559952', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559952', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:31:20] Production.INFO: ==4015== Releasing lock...  
[2025-02-26 06:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:31:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-02-26 06:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:32:05
    [end_date_ymd] => 2025-02-26 06:32:05
    [RateCDR] => 1
)
  
[2025-02-26 06:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:32:05' and `end` < '2025-02-26 06:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:32:17] Production.INFO: count ==165  
[2025-02-26 06:32:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:32:05 - End Time 2025-02-26 06:32:05  
[2025-02-26 06:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559957', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559957', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559957', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559957', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:32:17] Production.INFO: ProcessCDR(1,14559957,1,1,2)  
[2025-02-26 06:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559957', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559957', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:32:21] Production.INFO: ==4098== Releasing lock...  
[2025-02-26 06:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:32:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:33:05
    [end_date_ymd] => 2025-02-26 06:33:05
    [RateCDR] => 1
)
  
[2025-02-26 06:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:33:05' and `end` < '2025-02-26 06:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:33:17] Production.INFO: count ==169  
[2025-02-26 06:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:33:05 - End Time 2025-02-26 06:33:05  
[2025-02-26 06:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559962', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559962', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559962', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559962', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:33:17] Production.INFO: ProcessCDR(1,14559962,1,1,2)  
[2025-02-26 06:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559962', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559962', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:33:20] Production.INFO: ==4171== Releasing lock...  
[2025-02-26 06:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:33:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:34:05
    [end_date_ymd] => 2025-02-26 06:34:05
    [RateCDR] => 1
)
  
[2025-02-26 06:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:34:05' and `end` < '2025-02-26 06:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:34:17] Production.INFO: count ==169  
[2025-02-26 06:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:34:05 - End Time 2025-02-26 06:34:05  
[2025-02-26 06:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559967', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559967', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559967', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559967', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:34:17] Production.INFO: ProcessCDR(1,14559967,1,1,2)  
[2025-02-26 06:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:34:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559967', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559967', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:34:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:34:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:34:20] Production.INFO: ==4244== Releasing lock...  
[2025-02-26 06:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:34:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:35:05
    [end_date_ymd] => 2025-02-26 06:35:05
    [RateCDR] => 1
)
  
[2025-02-26 06:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:35:05' and `end` < '2025-02-26 06:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:35:17] Production.INFO: count ==169  
[2025-02-26 06:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:35:05 - End Time 2025-02-26 06:35:05  
[2025-02-26 06:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559972', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559972', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559972', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559972', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:35:17] Production.INFO: ProcessCDR(1,14559972,1,1,2)  
[2025-02-26 06:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559972', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559972', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:35:20] Production.INFO: ==4317== Releasing lock...  
[2025-02-26 06:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:35:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:36:05
    [end_date_ymd] => 2025-02-26 06:36:05
    [RateCDR] => 1
)
  
[2025-02-26 06:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:36:05' and `end` < '2025-02-26 06:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:36:17] Production.INFO: count ==169  
[2025-02-26 06:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:36:05 - End Time 2025-02-26 06:36:05  
[2025-02-26 06:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559977', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559977', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559977', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559977', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:36:17] Production.INFO: ProcessCDR(1,14559977,1,1,2)  
[2025-02-26 06:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:36:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559977', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559977', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:36:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:36:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:36:20] Production.INFO: ==4387== Releasing lock...  
[2025-02-26 06:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:36:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:37:05
    [end_date_ymd] => 2025-02-26 06:37:05
    [RateCDR] => 1
)
  
[2025-02-26 06:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:37:05' and `end` < '2025-02-26 06:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:37:17] Production.INFO: count ==170  
[2025-02-26 06:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:37:05 - End Time 2025-02-26 06:37:05  
[2025-02-26 06:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559982', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559982', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559982', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559982', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:37:17] Production.INFO: ProcessCDR(1,14559982,1,1,2)  
[2025-02-26 06:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559982', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559982', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:37:21] Production.INFO: ==4459== Releasing lock...  
[2025-02-26 06:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:37:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:38:05
    [end_date_ymd] => 2025-02-26 06:38:05
    [RateCDR] => 1
)
  
[2025-02-26 06:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:38:05' and `end` < '2025-02-26 06:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:38:17] Production.INFO: count ==170  
[2025-02-26 06:38:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:38:05 - End Time 2025-02-26 06:38:05  
[2025-02-26 06:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559987', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559987', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:38:17] Production.INFO: ProcessCDR(1,14559987,1,1,2)  
[2025-02-26 06:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:38:20] Production.INFO: ==4529== Releasing lock...  
[2025-02-26 06:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:38:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:39:05
    [end_date_ymd] => 2025-02-26 06:39:05
    [RateCDR] => 1
)
  
[2025-02-26 06:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:39:05' and `end` < '2025-02-26 06:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:39:17] Production.INFO: count ==170  
[2025-02-26 06:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:39:05 - End Time 2025-02-26 06:39:05  
[2025-02-26 06:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559992', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559992', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:39:17] Production.INFO: ProcessCDR(1,14559992,1,1,2)  
[2025-02-26 06:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:39:20] Production.INFO: ==4613== Releasing lock...  
[2025-02-26 06:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:39:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:40:05
    [end_date_ymd] => 2025-02-26 06:40:05
    [RateCDR] => 1
)
  
[2025-02-26 06:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:40:05' and `end` < '2025-02-26 06:40:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:40:17] Production.INFO: count ==170  
[2025-02-26 06:40:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:40:05 - End Time 2025-02-26 06:40:05  
[2025-02-26 06:40:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559998', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14559998', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559998', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14559998', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:40:17] Production.INFO: ProcessCDR(1,14559998,1,1,2)  
[2025-02-26 06:40:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14559998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:40:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14559998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:40:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14559998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:40:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14559998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:40:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559998', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:40:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14559998', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:40:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:40:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:40:20] Production.INFO: ==4692== Releasing lock...  
[2025-02-26 06:40:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:40:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:41:05
    [end_date_ymd] => 2025-02-26 06:41:05
    [RateCDR] => 1
)
  
[2025-02-26 06:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:41:05' and `end` < '2025-02-26 06:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:41:17] Production.INFO: count ==170  
[2025-02-26 06:41:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:41:05 - End Time 2025-02-26 06:41:05  
[2025-02-26 06:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560003', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560003', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560003', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560003', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:41:17] Production.INFO: ProcessCDR(1,14560003,1,1,2)  
[2025-02-26 06:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560003', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560003', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:41:20] Production.INFO: ==4804== Releasing lock...  
[2025-02-26 06:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:41:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:42:05
    [end_date_ymd] => 2025-02-26 06:42:05
    [RateCDR] => 1
)
  
[2025-02-26 06:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:42:05' and `end` < '2025-02-26 06:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:42:16] Production.INFO: count ==168  
[2025-02-26 06:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:42:05 - End Time 2025-02-26 06:42:05  
[2025-02-26 06:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560008', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560008', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560008', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560008', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:42:17] Production.INFO: ProcessCDR(1,14560008,1,1,2)  
[2025-02-26 06:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560008', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560008', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:42:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:42:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:42:20] Production.INFO: ==4879== Releasing lock...  
[2025-02-26 06:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:42:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:43:05
    [end_date_ymd] => 2025-02-26 06:43:05
    [RateCDR] => 1
)
  
[2025-02-26 06:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:43:05' and `end` < '2025-02-26 06:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:43:17] Production.INFO: count ==168  
[2025-02-26 06:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:43:05 - End Time 2025-02-26 06:43:05  
[2025-02-26 06:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560013', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560013', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560013', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560013', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:43:17] Production.INFO: ProcessCDR(1,14560013,1,1,2)  
[2025-02-26 06:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:43:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560013', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560013', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:43:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:43:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:43:20] Production.INFO: ==4952== Releasing lock...  
[2025-02-26 06:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:43:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:44:05
    [end_date_ymd] => 2025-02-26 06:44:05
    [RateCDR] => 1
)
  
[2025-02-26 06:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:44:05' and `end` < '2025-02-26 06:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:44:16] Production.INFO: count ==168  
[2025-02-26 06:44:16] Production.ERROR: pbx CDR StartTime 2025-02-26 03:44:05 - End Time 2025-02-26 06:44:05  
[2025-02-26 06:44:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:44:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560018', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:44:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560018', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:44:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560018', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:44:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560018', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:44:16] Production.INFO: ProcessCDR(1,14560018,1,1,2)  
[2025-02-26 06:44:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560018', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560018', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:44:20] Production.INFO: ==5021== Releasing lock...  
[2025-02-26 06:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:44:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:45:05
    [end_date_ymd] => 2025-02-26 06:45:05
    [RateCDR] => 1
)
  
[2025-02-26 06:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:45:05' and `end` < '2025-02-26 06:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:45:17] Production.INFO: count ==168  
[2025-02-26 06:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:45:05 - End Time 2025-02-26 06:45:05  
[2025-02-26 06:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560023', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560023', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560023', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560023', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:45:17] Production.INFO: ProcessCDR(1,14560023,1,1,2)  
[2025-02-26 06:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:45:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560023', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560023', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:45:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:45:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:45:20] Production.INFO: ==5092== Releasing lock...  
[2025-02-26 06:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:45:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:46:05
    [end_date_ymd] => 2025-02-26 06:46:05
    [RateCDR] => 1
)
  
[2025-02-26 06:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:46:05' and `end` < '2025-02-26 06:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:46:17] Production.INFO: count ==168  
[2025-02-26 06:46:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:46:05 - End Time 2025-02-26 06:46:05  
[2025-02-26 06:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560028', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560028', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560028', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560028', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:46:17] Production.INFO: ProcessCDR(1,14560028,1,1,2)  
[2025-02-26 06:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560028', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560028', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:46:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:46:20] Production.INFO: ==5165== Releasing lock...  
[2025-02-26 06:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:46:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:47:05
    [end_date_ymd] => 2025-02-26 06:47:05
    [RateCDR] => 1
)
  
[2025-02-26 06:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:47:05' and `end` < '2025-02-26 06:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:47:17] Production.INFO: count ==168  
[2025-02-26 06:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:47:05 - End Time 2025-02-26 06:47:05  
[2025-02-26 06:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560033', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560033', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560033', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560033', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:47:17] Production.INFO: ProcessCDR(1,14560033,1,1,2)  
[2025-02-26 06:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560033', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560033', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:47:20] Production.INFO: ==5243== Releasing lock...  
[2025-02-26 06:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:47:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:48:05
    [end_date_ymd] => 2025-02-26 06:48:05
    [RateCDR] => 1
)
  
[2025-02-26 06:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:48:05' and `end` < '2025-02-26 06:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:48:17] Production.INFO: count ==168  
[2025-02-26 06:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:48:05 - End Time 2025-02-26 06:48:05  
[2025-02-26 06:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560038', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560038', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:48:17] Production.INFO: ProcessCDR(1,14560038,1,1,2)  
[2025-02-26 06:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:48:20] Production.INFO: ==5315== Releasing lock...  
[2025-02-26 06:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:48:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:49:05
    [end_date_ymd] => 2025-02-26 06:49:05
    [RateCDR] => 1
)
  
[2025-02-26 06:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:49:05' and `end` < '2025-02-26 06:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:49:17] Production.INFO: count ==168  
[2025-02-26 06:49:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:49:05 - End Time 2025-02-26 06:49:05  
[2025-02-26 06:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560043', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560043', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:49:17] Production.INFO: ProcessCDR(1,14560043,1,1,2)  
[2025-02-26 06:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:49:20] Production.INFO: ==5385== Releasing lock...  
[2025-02-26 06:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:49:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:50:06
    [end_date_ymd] => 2025-02-26 06:50:06
    [RateCDR] => 1
)
  
[2025-02-26 06:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:50:06' and `end` < '2025-02-26 06:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:50:18] Production.INFO: count ==168  
[2025-02-26 06:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:50:06 - End Time 2025-02-26 06:50:06  
[2025-02-26 06:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560049', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560049', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560049', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560049', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:50:18] Production.INFO: ProcessCDR(1,14560049,1,1,2)  
[2025-02-26 06:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560049', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560049', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:50:21] Production.INFO: ==5458== Releasing lock...  
[2025-02-26 06:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:50:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:51:05
    [end_date_ymd] => 2025-02-26 06:51:05
    [RateCDR] => 1
)
  
[2025-02-26 06:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:51:05' and `end` < '2025-02-26 06:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:51:17] Production.INFO: count ==168  
[2025-02-26 06:51:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:51:05 - End Time 2025-02-26 06:51:05  
[2025-02-26 06:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560054', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560054', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560054', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560054', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:51:17] Production.INFO: ProcessCDR(1,14560054,1,1,2)  
[2025-02-26 06:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560054', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560054', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:51:20] Production.INFO: ==5532== Releasing lock...  
[2025-02-26 06:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:51:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:52:05
    [end_date_ymd] => 2025-02-26 06:52:05
    [RateCDR] => 1
)
  
[2025-02-26 06:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:52:05' and `end` < '2025-02-26 06:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:52:17] Production.INFO: count ==172  
[2025-02-26 06:52:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:52:05 - End Time 2025-02-26 06:52:05  
[2025-02-26 06:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560059', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560059', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560059', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560059', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:52:17] Production.INFO: ProcessCDR(1,14560059,1,1,2)  
[2025-02-26 06:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560059', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560059', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:52:21] Production.INFO: ==5602== Releasing lock...  
[2025-02-26 06:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:52:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:53:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:53:04
    [end_date_ymd] => 2025-02-26 06:53:04
    [RateCDR] => 1
)
  
[2025-02-26 06:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:53:04' and `end` < '2025-02-26 06:53:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:53:16] Production.INFO: count ==170  
[2025-02-26 06:53:16] Production.ERROR: pbx CDR StartTime 2025-02-26 03:53:04 - End Time 2025-02-26 06:53:04  
[2025-02-26 06:53:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:53:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560064', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:53:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560064', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:53:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560064', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:53:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560064', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:53:16] Production.INFO: ProcessCDR(1,14560064,1,1,2)  
[2025-02-26 06:53:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:53:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:53:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:53:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:53:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560064', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:53:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560064', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:53:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:53:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:53:19] Production.INFO: ==5679== Releasing lock...  
[2025-02-26 06:53:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:53:19] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:54:06
    [end_date_ymd] => 2025-02-26 06:54:06
    [RateCDR] => 1
)
  
[2025-02-26 06:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:54:06' and `end` < '2025-02-26 06:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:54:18] Production.INFO: count ==168  
[2025-02-26 06:54:18] Production.ERROR: pbx CDR StartTime 2025-02-26 03:54:06 - End Time 2025-02-26 06:54:06  
[2025-02-26 06:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560069', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560069', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560069', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560069', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:54:18] Production.INFO: ProcessCDR(1,14560069,1,1,2)  
[2025-02-26 06:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560069', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560069', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:54:21] Production.INFO: ==5753== Releasing lock...  
[2025-02-26 06:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:54:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:55:05
    [end_date_ymd] => 2025-02-26 06:55:05
    [RateCDR] => 1
)
  
[2025-02-26 06:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:55:05' and `end` < '2025-02-26 06:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:55:17] Production.INFO: count ==166  
[2025-02-26 06:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:55:05 - End Time 2025-02-26 06:55:05  
[2025-02-26 06:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560074', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560074', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560074', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560074', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:55:17] Production.INFO: ProcessCDR(1,14560074,1,1,2)  
[2025-02-26 06:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560074', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560074', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:55:20] Production.INFO: ==5824== Releasing lock...  
[2025-02-26 06:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:55:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:56:06
    [end_date_ymd] => 2025-02-26 06:56:06
    [RateCDR] => 1
)
  
[2025-02-26 06:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:56:06' and `end` < '2025-02-26 06:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:56:17] Production.INFO: count ==166  
[2025-02-26 06:56:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:56:06 - End Time 2025-02-26 06:56:06  
[2025-02-26 06:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560079', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560079', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560079', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560079', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:56:17] Production.INFO: ProcessCDR(1,14560079,1,1,2)  
[2025-02-26 06:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560079', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560079', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:56:21] Production.INFO: ==5899== Releasing lock...  
[2025-02-26 06:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:56:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:57:05
    [end_date_ymd] => 2025-02-26 06:57:05
    [RateCDR] => 1
)
  
[2025-02-26 06:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:57:05' and `end` < '2025-02-26 06:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:57:17] Production.INFO: count ==170  
[2025-02-26 06:57:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:57:05 - End Time 2025-02-26 06:57:05  
[2025-02-26 06:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560084', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560084', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560084', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560084', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:57:17] Production.INFO: ProcessCDR(1,14560084,1,1,2)  
[2025-02-26 06:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560084', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560084', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:57:20] Production.INFO: ==6010== Releasing lock...  
[2025-02-26 06:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:57:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:58:05
    [end_date_ymd] => 2025-02-26 06:58:05
    [RateCDR] => 1
)
  
[2025-02-26 06:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:58:05' and `end` < '2025-02-26 06:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:58:17] Production.INFO: count ==170  
[2025-02-26 06:58:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:58:05 - End Time 2025-02-26 06:58:05  
[2025-02-26 06:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560089', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560089', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:58:17] Production.INFO: ProcessCDR(1,14560089,1,1,2)  
[2025-02-26 06:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:58:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:58:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:58:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:58:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:58:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:58:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:58:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:58:20] Production.INFO: ==6084== Releasing lock...  
[2025-02-26 06:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:58:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 06:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 03:59:05
    [end_date_ymd] => 2025-02-26 06:59:05
    [RateCDR] => 1
)
  
[2025-02-26 06:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 03:59:05' and `end` < '2025-02-26 06:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 06:59:17] Production.INFO: count ==170  
[2025-02-26 06:59:17] Production.ERROR: pbx CDR StartTime 2025-02-26 03:59:05 - End Time 2025-02-26 06:59:05  
[2025-02-26 06:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560094', 'tblTempVendorCDR_20' ) start  
[2025-02-26 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560094', 'tblTempVendorCDR_20' ) end  
[2025-02-26 06:59:17] Production.INFO: ProcessCDR(1,14560094,1,1,2)  
[2025-02-26 06:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 06:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 06:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 06:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 06:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 06:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 06:59:20] Production.INFO: ==6154== Releasing lock...  
[2025-02-26 06:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 06:59:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:00:06
    [end_date_ymd] => 2025-02-26 07:00:06
    [RateCDR] => 1
)
  
[2025-02-26 07:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:00:06' and `end` < '2025-02-26 07:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:00:18] Production.INFO: count ==164  
[2025-02-26 07:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:00:06 - End Time 2025-02-26 07:00:06  
[2025-02-26 07:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560100', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560100', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560100', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560100', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:00:18] Production.INFO: ProcessCDR(1,14560100,1,1,2)  
[2025-02-26 07:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:00:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560100', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:00:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560100', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:00:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:00:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:00:21] Production.INFO: ==6232== Releasing lock...  
[2025-02-26 07:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:00:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:01:05
    [end_date_ymd] => 2025-02-26 07:01:05
    [RateCDR] => 1
)
  
[2025-02-26 07:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:01:05' and `end` < '2025-02-26 07:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:01:17] Production.INFO: count ==170  
[2025-02-26 07:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:01:05 - End Time 2025-02-26 07:01:05  
[2025-02-26 07:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560105', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560105', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560105', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560105', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:01:17] Production.INFO: ProcessCDR(1,14560105,1,1,2)  
[2025-02-26 07:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560105', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560105', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:01:20] Production.INFO: ==6396== Releasing lock...  
[2025-02-26 07:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:01:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 07:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:02:05
    [end_date_ymd] => 2025-02-26 07:02:05
    [RateCDR] => 1
)
  
[2025-02-26 07:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:02:05' and `end` < '2025-02-26 07:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:02:17] Production.INFO: count ==172  
[2025-02-26 07:02:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:02:05 - End Time 2025-02-26 07:02:05  
[2025-02-26 07:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560106', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560106', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560106', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560106', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:02:17] Production.INFO: ProcessCDR(1,14560106,1,1,2)  
[2025-02-26 07:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:02:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560106', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:02:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560106', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:02:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:02:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:02:20] Production.INFO: ==6468== Releasing lock...  
[2025-02-26 07:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:02:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:03:05
    [end_date_ymd] => 2025-02-26 07:03:05
    [RateCDR] => 1
)
  
[2025-02-26 07:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:03:05' and `end` < '2025-02-26 07:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:03:17] Production.INFO: count ==172  
[2025-02-26 07:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:03:05 - End Time 2025-02-26 07:03:05  
[2025-02-26 07:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560115', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560115', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560115', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560115', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:03:17] Production.INFO: ProcessCDR(1,14560115,1,1,2)  
[2025-02-26 07:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560115', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560115', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:03:20] Production.INFO: ==6540== Releasing lock...  
[2025-02-26 07:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:03:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:04:05
    [end_date_ymd] => 2025-02-26 07:04:05
    [RateCDR] => 1
)
  
[2025-02-26 07:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:04:05' and `end` < '2025-02-26 07:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:04:18] Production.INFO: count ==172  
[2025-02-26 07:04:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:04:05 - End Time 2025-02-26 07:04:05  
[2025-02-26 07:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560120', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560120', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560120', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560120', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:04:18] Production.INFO: ProcessCDR(1,14560120,1,1,2)  
[2025-02-26 07:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:04:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:04:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560120', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560120', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:04:22] Production.INFO: ==6615== Releasing lock...  
[2025-02-26 07:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:04:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:05:05
    [end_date_ymd] => 2025-02-26 07:05:05
    [RateCDR] => 1
)
  
[2025-02-26 07:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:05:05' and `end` < '2025-02-26 07:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:05:17] Production.INFO: count ==172  
[2025-02-26 07:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:05:05 - End Time 2025-02-26 07:05:05  
[2025-02-26 07:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560125', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560125', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560125', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560125', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:05:17] Production.INFO: ProcessCDR(1,14560125,1,1,2)  
[2025-02-26 07:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560125', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560125', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:05:21] Production.INFO: ==6763== Releasing lock...  
[2025-02-26 07:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:05:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:06:05
    [end_date_ymd] => 2025-02-26 07:06:05
    [RateCDR] => 1
)
  
[2025-02-26 07:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:06:05' and `end` < '2025-02-26 07:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:06:17] Production.INFO: count ==172  
[2025-02-26 07:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:06:05 - End Time 2025-02-26 07:06:05  
[2025-02-26 07:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560130', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560130', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560130', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560130', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:06:17] Production.INFO: ProcessCDR(1,14560130,1,1,2)  
[2025-02-26 07:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560130', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560130', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:06:21] Production.INFO: ==6842== Releasing lock...  
[2025-02-26 07:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:06:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:07:05
    [end_date_ymd] => 2025-02-26 07:07:05
    [RateCDR] => 1
)
  
[2025-02-26 07:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:07:05' and `end` < '2025-02-26 07:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:07:17] Production.INFO: count ==172  
[2025-02-26 07:07:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:07:05 - End Time 2025-02-26 07:07:05  
[2025-02-26 07:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560135', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560135', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560135', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560135', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:07:17] Production.INFO: ProcessCDR(1,14560135,1,1,2)  
[2025-02-26 07:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560135', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560135', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:07:20] Production.INFO: ==6916== Releasing lock...  
[2025-02-26 07:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:07:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:08:05
    [end_date_ymd] => 2025-02-26 07:08:05
    [RateCDR] => 1
)
  
[2025-02-26 07:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:08:05' and `end` < '2025-02-26 07:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:08:18] Production.INFO: count ==172  
[2025-02-26 07:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:08:05 - End Time 2025-02-26 07:08:05  
[2025-02-26 07:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560139', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560139', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:08:18] Production.INFO: ProcessCDR(1,14560139,1,1,2)  
[2025-02-26 07:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:08:21] Production.INFO: ==7071== Releasing lock...  
[2025-02-26 07:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:08:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:09:05
    [end_date_ymd] => 2025-02-26 07:09:05
    [RateCDR] => 1
)
  
[2025-02-26 07:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:09:05' and `end` < '2025-02-26 07:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:09:17] Production.INFO: count ==172  
[2025-02-26 07:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:09:05 - End Time 2025-02-26 07:09:05  
[2025-02-26 07:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560145', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560145', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:09:17] Production.INFO: ProcessCDR(1,14560145,1,1,2)  
[2025-02-26 07:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:09:20] Production.INFO: ==7145== Releasing lock...  
[2025-02-26 07:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:09:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:10:06
    [end_date_ymd] => 2025-02-26 07:10:06
    [RateCDR] => 1
)
  
[2025-02-26 07:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:10:06' and `end` < '2025-02-26 07:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:10:18] Production.INFO: count ==174  
[2025-02-26 07:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:10:06 - End Time 2025-02-26 07:10:06  
[2025-02-26 07:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560151', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560151', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560151', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560151', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:10:18] Production.INFO: ProcessCDR(1,14560151,1,1,2)  
[2025-02-26 07:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560151', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560151', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:10:22] Production.INFO: ==7218== Releasing lock...  
[2025-02-26 07:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:10:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:11:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:11:04
    [end_date_ymd] => 2025-02-26 07:11:04
    [RateCDR] => 1
)
  
[2025-02-26 07:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:11:04' and `end` < '2025-02-26 07:11:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:11:16] Production.INFO: count ==174  
[2025-02-26 07:11:16] Production.ERROR: pbx CDR StartTime 2025-02-26 04:11:04 - End Time 2025-02-26 07:11:04  
[2025-02-26 07:11:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:11:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560156', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:11:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560156', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:11:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560156', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:11:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560156', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:11:16] Production.INFO: ProcessCDR(1,14560156,1,1,2)  
[2025-02-26 07:11:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:11:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:11:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:11:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:11:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560156', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:11:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560156', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:11:19] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:11:19] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:11:19] Production.INFO: ==7294== Releasing lock...  
[2025-02-26 07:11:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:11:19] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:12:05
    [end_date_ymd] => 2025-02-26 07:12:05
    [RateCDR] => 1
)
  
[2025-02-26 07:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:12:05' and `end` < '2025-02-26 07:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:12:17] Production.INFO: count ==174  
[2025-02-26 07:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:12:05 - End Time 2025-02-26 07:12:05  
[2025-02-26 07:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560161', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560161', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560161', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560161', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:12:17] Production.INFO: ProcessCDR(1,14560161,1,1,2)  
[2025-02-26 07:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560161', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560161', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:12:20] Production.INFO: ==7484== Releasing lock...  
[2025-02-26 07:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:12:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:13:05
    [end_date_ymd] => 2025-02-26 07:13:05
    [RateCDR] => 1
)
  
[2025-02-26 07:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:13:05' and `end` < '2025-02-26 07:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:13:17] Production.INFO: count ==174  
[2025-02-26 07:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:13:05 - End Time 2025-02-26 07:13:05  
[2025-02-26 07:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560166', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560166', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560166', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560166', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:13:17] Production.INFO: ProcessCDR(1,14560166,1,1,2)  
[2025-02-26 07:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560166', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560166', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:13:20] Production.INFO: ==7554== Releasing lock...  
[2025-02-26 07:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:13:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:14:05
    [end_date_ymd] => 2025-02-26 07:14:05
    [RateCDR] => 1
)
  
[2025-02-26 07:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:14:05' and `end` < '2025-02-26 07:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:14:17] Production.INFO: count ==174  
[2025-02-26 07:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:14:05 - End Time 2025-02-26 07:14:05  
[2025-02-26 07:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560171', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560171', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560171', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560171', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:14:17] Production.INFO: ProcessCDR(1,14560171,1,1,2)  
[2025-02-26 07:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:14:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560171', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560171', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:14:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:14:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:14:20] Production.INFO: ==7629== Releasing lock...  
[2025-02-26 07:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:14:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:15:05
    [end_date_ymd] => 2025-02-26 07:15:05
    [RateCDR] => 1
)
  
[2025-02-26 07:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:15:05' and `end` < '2025-02-26 07:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:15:18] Production.INFO: count ==174  
[2025-02-26 07:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:15:05 - End Time 2025-02-26 07:15:05  
[2025-02-26 07:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560176', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560176', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560176', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560176', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:15:18] Production.INFO: ProcessCDR(1,14560176,1,1,2)  
[2025-02-26 07:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560176', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560176', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:15:21] Production.INFO: ==7783== Releasing lock...  
[2025-02-26 07:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:15:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:16:05
    [end_date_ymd] => 2025-02-26 07:16:05
    [RateCDR] => 1
)
  
[2025-02-26 07:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:16:05' and `end` < '2025-02-26 07:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:16:17] Production.INFO: count ==174  
[2025-02-26 07:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:16:05 - End Time 2025-02-26 07:16:05  
[2025-02-26 07:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560181', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560181', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:16:17] Production.INFO: ProcessCDR(1,14560181,1,1,2)  
[2025-02-26 07:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:16:20] Production.INFO: ==7853== Releasing lock...  
[2025-02-26 07:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:16:20] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:17:06
    [end_date_ymd] => 2025-02-26 07:17:06
    [RateCDR] => 1
)
  
[2025-02-26 07:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:17:06' and `end` < '2025-02-26 07:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:17:19] Production.INFO: count ==174  
[2025-02-26 07:17:19] Production.ERROR: pbx CDR StartTime 2025-02-26 04:17:06 - End Time 2025-02-26 07:17:06  
[2025-02-26 07:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560186', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560186', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:17:19] Production.INFO: ProcessCDR(1,14560186,1,1,2)  
[2025-02-26 07:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:17:23] Production.INFO: ==7927== Releasing lock...  
[2025-02-26 07:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:17:23] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:18:06
    [end_date_ymd] => 2025-02-26 07:18:06
    [RateCDR] => 1
)
  
[2025-02-26 07:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:18:06' and `end` < '2025-02-26 07:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:18:18] Production.INFO: count ==174  
[2025-02-26 07:18:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:18:06 - End Time 2025-02-26 07:18:06  
[2025-02-26 07:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560191', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560191', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:18:18] Production.INFO: ProcessCDR(1,14560191,1,1,2)  
[2025-02-26 07:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:18:22] Production.INFO: ==7998== Releasing lock...  
[2025-02-26 07:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:18:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:19:06
    [end_date_ymd] => 2025-02-26 07:19:06
    [RateCDR] => 1
)
  
[2025-02-26 07:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:19:06' and `end` < '2025-02-26 07:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:19:18] Production.INFO: count ==174  
[2025-02-26 07:19:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:19:06 - End Time 2025-02-26 07:19:06  
[2025-02-26 07:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560196', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560196', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:19:18] Production.INFO: ProcessCDR(1,14560196,1,1,2)  
[2025-02-26 07:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:19:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:19:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:19:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:19:22] Production.INFO: ==8085== Releasing lock...  
[2025-02-26 07:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:19:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:20:06
    [end_date_ymd] => 2025-02-26 07:20:06
    [RateCDR] => 1
)
  
[2025-02-26 07:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:20:06' and `end` < '2025-02-26 07:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:20:18] Production.INFO: count ==178  
[2025-02-26 07:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:20:06 - End Time 2025-02-26 07:20:06  
[2025-02-26 07:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560202', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560202', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560202', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560202', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:20:18] Production.INFO: ProcessCDR(1,14560202,1,1,2)  
[2025-02-26 07:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560202', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560202', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:20:22] Production.INFO: ==8176== Releasing lock...  
[2025-02-26 07:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:20:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:21:05
    [end_date_ymd] => 2025-02-26 07:21:05
    [RateCDR] => 1
)
  
[2025-02-26 07:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:21:05' and `end` < '2025-02-26 07:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:21:17] Production.INFO: count ==191  
[2025-02-26 07:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:21:05 - End Time 2025-02-26 07:21:05  
[2025-02-26 07:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560207', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560207', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560207', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560207', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:21:17] Production.INFO: ProcessCDR(1,14560207,1,1,2)  
[2025-02-26 07:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560207', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560207', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:21:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:21:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:21:23] Production.INFO: ==8256== Releasing lock...  
[2025-02-26 07:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:21:23] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:22:06
    [end_date_ymd] => 2025-02-26 07:22:06
    [RateCDR] => 1
)
  
[2025-02-26 07:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:22:06' and `end` < '2025-02-26 07:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:22:18] Production.INFO: count ==191  
[2025-02-26 07:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:22:06 - End Time 2025-02-26 07:22:06  
[2025-02-26 07:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560212', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560212', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560212', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560212', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:22:18] Production.INFO: ProcessCDR(1,14560212,1,1,2)  
[2025-02-26 07:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560212', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560212', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:22:21] Production.INFO: ==8336== Releasing lock...  
[2025-02-26 07:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:22:21] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:23:06
    [end_date_ymd] => 2025-02-26 07:23:06
    [RateCDR] => 1
)
  
[2025-02-26 07:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:23:06' and `end` < '2025-02-26 07:23:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:23:18] Production.INFO: count ==193  
[2025-02-26 07:23:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:23:06 - End Time 2025-02-26 07:23:06  
[2025-02-26 07:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560217', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560217', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560217', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560217', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:23:18] Production.INFO: ProcessCDR(1,14560217,1,1,2)  
[2025-02-26 07:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560217', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560217', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:23:22] Production.INFO: ==8413== Releasing lock...  
[2025-02-26 07:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:23:22] Production.INFO: 29 MB  #Memory Used#   
[2025-02-26 07:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:24:06
    [end_date_ymd] => 2025-02-26 07:24:06
    [RateCDR] => 1
)
  
[2025-02-26 07:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:24:06' and `end` < '2025-02-26 07:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:24:18] Production.INFO: count ==200  
[2025-02-26 07:24:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:24:06 - End Time 2025-02-26 07:24:06  
[2025-02-26 07:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560222', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560222', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560222', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560222', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:24:18] Production.INFO: ProcessCDR(1,14560222,1,1,2)  
[2025-02-26 07:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:24:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:24:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:24:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:24:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560222', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:24:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560222', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:24:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:24:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:24:23] Production.INFO: ==8492== Releasing lock...  
[2025-02-26 07:24:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:24:23] Production.INFO: 29.25 MB  #Memory Used#   
[2025-02-26 07:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:25:05
    [end_date_ymd] => 2025-02-26 07:25:05
    [RateCDR] => 1
)
  
[2025-02-26 07:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:25:05' and `end` < '2025-02-26 07:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:25:17] Production.INFO: count ==204  
[2025-02-26 07:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:25:05 - End Time 2025-02-26 07:25:05  
[2025-02-26 07:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560227', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560227', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560227', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560227', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:25:17] Production.INFO: ProcessCDR(1,14560227,1,1,2)  
[2025-02-26 07:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560227', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560227', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:25:20] Production.INFO: ==8565== Releasing lock...  
[2025-02-26 07:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:25:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 07:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:26:05
    [end_date_ymd] => 2025-02-26 07:26:05
    [RateCDR] => 1
)
  
[2025-02-26 07:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:26:05' and `end` < '2025-02-26 07:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:26:17] Production.INFO: count ==205  
[2025-02-26 07:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:26:05 - End Time 2025-02-26 07:26:05  
[2025-02-26 07:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560232', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560232', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:26:17] Production.INFO: ProcessCDR(1,14560232,1,1,2)  
[2025-02-26 07:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:26:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:26:22] Production.INFO: ==8649== Releasing lock...  
[2025-02-26 07:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:26:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 07:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:27:05
    [end_date_ymd] => 2025-02-26 07:27:05
    [RateCDR] => 1
)
  
[2025-02-26 07:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:27:05' and `end` < '2025-02-26 07:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:27:17] Production.INFO: count ==208  
[2025-02-26 07:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:27:05 - End Time 2025-02-26 07:27:05  
[2025-02-26 07:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560237', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560237', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:27:17] Production.INFO: ProcessCDR(1,14560237,1,1,2)  
[2025-02-26 07:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:27:22] Production.INFO: ==8731== Releasing lock...  
[2025-02-26 07:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:27:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 07:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:28:06
    [end_date_ymd] => 2025-02-26 07:28:06
    [RateCDR] => 1
)
  
[2025-02-26 07:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:28:06' and `end` < '2025-02-26 07:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:28:18] Production.INFO: count ==213  
[2025-02-26 07:28:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:28:06 - End Time 2025-02-26 07:28:06  
[2025-02-26 07:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560242', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560242', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:28:18] Production.INFO: ProcessCDR(1,14560242,1,1,2)  
[2025-02-26 07:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:28:21] Production.INFO: ==8849== Releasing lock...  
[2025-02-26 07:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:28:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:29:05
    [end_date_ymd] => 2025-02-26 07:29:05
    [RateCDR] => 1
)
  
[2025-02-26 07:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:29:05' and `end` < '2025-02-26 07:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:29:17] Production.INFO: count ==213  
[2025-02-26 07:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:29:05 - End Time 2025-02-26 07:29:05  
[2025-02-26 07:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560247', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560247', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:29:17] Production.INFO: ProcessCDR(1,14560247,1,1,2)  
[2025-02-26 07:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:29:21] Production.INFO: ==8931== Releasing lock...  
[2025-02-26 07:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:29:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:30:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:30:07
    [end_date_ymd] => 2025-02-26 07:30:07
    [RateCDR] => 1
)
  
[2025-02-26 07:30:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:30:07' and `end` < '2025-02-26 07:30:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:30:19] Production.INFO: count ==215  
[2025-02-26 07:30:19] Production.ERROR: pbx CDR StartTime 2025-02-26 04:30:07 - End Time 2025-02-26 07:30:07  
[2025-02-26 07:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560252', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560252', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:30:19] Production.INFO: ProcessCDR(1,14560252,1,1,2)  
[2025-02-26 07:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:30:22] Production.INFO: ==9015== Releasing lock...  
[2025-02-26 07:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:30:22] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:31:05
    [end_date_ymd] => 2025-02-26 07:31:05
    [RateCDR] => 1
)
  
[2025-02-26 07:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:31:05' and `end` < '2025-02-26 07:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:31:17] Production.INFO: count ==215  
[2025-02-26 07:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:31:05 - End Time 2025-02-26 07:31:05  
[2025-02-26 07:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560258', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560258', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560258', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560258', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:31:17] Production.INFO: ProcessCDR(1,14560258,1,1,2)  
[2025-02-26 07:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560258', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560258', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:31:21] Production.INFO: ==9095== Releasing lock...  
[2025-02-26 07:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:31:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:32:05
    [end_date_ymd] => 2025-02-26 07:32:05
    [RateCDR] => 1
)
  
[2025-02-26 07:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:32:05' and `end` < '2025-02-26 07:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:32:17] Production.INFO: count ==219  
[2025-02-26 07:32:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:32:05 - End Time 2025-02-26 07:32:05  
[2025-02-26 07:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560263', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560263', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560263', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560263', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:32:17] Production.INFO: ProcessCDR(1,14560263,1,1,2)  
[2025-02-26 07:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560263', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560263', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:32:21] Production.INFO: ==9183== Releasing lock...  
[2025-02-26 07:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:32:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:33:05
    [end_date_ymd] => 2025-02-26 07:33:05
    [RateCDR] => 1
)
  
[2025-02-26 07:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:33:05' and `end` < '2025-02-26 07:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:33:17] Production.INFO: count ==219  
[2025-02-26 07:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:33:05 - End Time 2025-02-26 07:33:05  
[2025-02-26 07:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560268', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560268', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560268', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560268', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:33:17] Production.INFO: ProcessCDR(1,14560268,1,1,2)  
[2025-02-26 07:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560268', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560268', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:33:21] Production.INFO: ==9267== Releasing lock...  
[2025-02-26 07:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:33:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:34:06
    [end_date_ymd] => 2025-02-26 07:34:06
    [RateCDR] => 1
)
  
[2025-02-26 07:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:34:06' and `end` < '2025-02-26 07:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:34:18] Production.INFO: count ==219  
[2025-02-26 07:34:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:34:06 - End Time 2025-02-26 07:34:06  
[2025-02-26 07:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560273', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560273', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560273', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560273', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:34:18] Production.INFO: ProcessCDR(1,14560273,1,1,2)  
[2025-02-26 07:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560273', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560273', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:34:21] Production.INFO: ==9351== Releasing lock...  
[2025-02-26 07:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:34:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:35:05
    [end_date_ymd] => 2025-02-26 07:35:05
    [RateCDR] => 1
)
  
[2025-02-26 07:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:35:05' and `end` < '2025-02-26 07:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:35:17] Production.INFO: count ==219  
[2025-02-26 07:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:35:05 - End Time 2025-02-26 07:35:05  
[2025-02-26 07:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560278', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560278', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560278', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560278', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:35:17] Production.INFO: ProcessCDR(1,14560278,1,1,2)  
[2025-02-26 07:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560278', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560278', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:35:20] Production.INFO: ==9436== Releasing lock...  
[2025-02-26 07:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:35:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:36:05
    [end_date_ymd] => 2025-02-26 07:36:05
    [RateCDR] => 1
)
  
[2025-02-26 07:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:36:05' and `end` < '2025-02-26 07:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:36:17] Production.INFO: count ==219  
[2025-02-26 07:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:36:05 - End Time 2025-02-26 07:36:05  
[2025-02-26 07:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560283', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560283', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:36:17] Production.INFO: ProcessCDR(1,14560283,1,1,2)  
[2025-02-26 07:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:36:21] Production.INFO: ==9523== Releasing lock...  
[2025-02-26 07:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:36:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:37:05
    [end_date_ymd] => 2025-02-26 07:37:05
    [RateCDR] => 1
)
  
[2025-02-26 07:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:37:05' and `end` < '2025-02-26 07:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:37:17] Production.INFO: count ==219  
[2025-02-26 07:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:37:05 - End Time 2025-02-26 07:37:05  
[2025-02-26 07:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560288', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560288', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:37:17] Production.INFO: ProcessCDR(1,14560288,1,1,2)  
[2025-02-26 07:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:37:20] Production.INFO: ==9606== Releasing lock...  
[2025-02-26 07:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:37:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:38:06
    [end_date_ymd] => 2025-02-26 07:38:06
    [RateCDR] => 1
)
  
[2025-02-26 07:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:38:06' and `end` < '2025-02-26 07:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:38:18] Production.INFO: count ==215  
[2025-02-26 07:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:38:06 - End Time 2025-02-26 07:38:06  
[2025-02-26 07:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560293', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560293', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:38:18] Production.INFO: ProcessCDR(1,14560293,1,1,2)  
[2025-02-26 07:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:38:21] Production.INFO: ==9696== Releasing lock...  
[2025-02-26 07:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:38:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:39:05
    [end_date_ymd] => 2025-02-26 07:39:05
    [RateCDR] => 1
)
  
[2025-02-26 07:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:39:05' and `end` < '2025-02-26 07:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:39:16] Production.INFO: count ==215  
[2025-02-26 07:39:16] Production.ERROR: pbx CDR StartTime 2025-02-26 04:39:05 - End Time 2025-02-26 07:39:05  
[2025-02-26 07:39:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:39:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:39:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:39:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560298', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:39:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560298', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:39:16] Production.INFO: ProcessCDR(1,14560298,1,1,2)  
[2025-02-26 07:39:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:39:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:39:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:39:20] Production.INFO: ==9777== Releasing lock...  
[2025-02-26 07:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:39:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:40:06
    [end_date_ymd] => 2025-02-26 07:40:06
    [RateCDR] => 1
)
  
[2025-02-26 07:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:40:06' and `end` < '2025-02-26 07:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:40:18] Production.INFO: count ==213  
[2025-02-26 07:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:40:06 - End Time 2025-02-26 07:40:06  
[2025-02-26 07:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560304', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560304', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560304', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560304', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:40:18] Production.INFO: ProcessCDR(1,14560304,1,1,2)  
[2025-02-26 07:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560304', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560304', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:40:22] Production.INFO: ==9861== Releasing lock...  
[2025-02-26 07:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:40:22] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:41:05
    [end_date_ymd] => 2025-02-26 07:41:05
    [RateCDR] => 1
)
  
[2025-02-26 07:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:41:05' and `end` < '2025-02-26 07:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:41:17] Production.INFO: count ==213  
[2025-02-26 07:41:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:41:05 - End Time 2025-02-26 07:41:05  
[2025-02-26 07:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560309', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560309', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560309', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560309', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:41:17] Production.INFO: ProcessCDR(1,14560309,1,1,2)  
[2025-02-26 07:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560309', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560309', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:41:20] Production.INFO: ==9948== Releasing lock...  
[2025-02-26 07:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:41:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:42:05
    [end_date_ymd] => 2025-02-26 07:42:05
    [RateCDR] => 1
)
  
[2025-02-26 07:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:42:05' and `end` < '2025-02-26 07:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:42:17] Production.INFO: count ==220  
[2025-02-26 07:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:42:05 - End Time 2025-02-26 07:42:05  
[2025-02-26 07:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560314', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560314', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560314', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560314', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:42:17] Production.INFO: ProcessCDR(1,14560314,1,1,2)  
[2025-02-26 07:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560314', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560314', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:42:21] Production.INFO: ==10030== Releasing lock...  
[2025-02-26 07:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:42:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:43:05
    [end_date_ymd] => 2025-02-26 07:43:05
    [RateCDR] => 1
)
  
[2025-02-26 07:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:43:05' and `end` < '2025-02-26 07:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:43:17] Production.INFO: count ==229  
[2025-02-26 07:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:43:05 - End Time 2025-02-26 07:43:05  
[2025-02-26 07:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560319', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560319', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560319', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560319', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:43:17] Production.INFO: ProcessCDR(1,14560319,1,1,2)  
[2025-02-26 07:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:43:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560319', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560319', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:43:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:43:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:43:20] Production.INFO: ==10153== Releasing lock...  
[2025-02-26 07:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:43:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:44:05
    [end_date_ymd] => 2025-02-26 07:44:05
    [RateCDR] => 1
)
  
[2025-02-26 07:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:44:05' and `end` < '2025-02-26 07:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:44:17] Production.INFO: count ==229  
[2025-02-26 07:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:44:05 - End Time 2025-02-26 07:44:05  
[2025-02-26 07:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560324', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560324', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560324', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560324', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:44:17] Production.INFO: ProcessCDR(1,14560324,1,1,2)  
[2025-02-26 07:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560324', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560324', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:44:20] Production.INFO: ==10233== Releasing lock...  
[2025-02-26 07:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:44:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:45:05
    [end_date_ymd] => 2025-02-26 07:45:05
    [RateCDR] => 1
)
  
[2025-02-26 07:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:45:05' and `end` < '2025-02-26 07:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:45:17] Production.INFO: count ==229  
[2025-02-26 07:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:45:05 - End Time 2025-02-26 07:45:05  
[2025-02-26 07:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560329', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560329', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560329', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560329', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:45:17] Production.INFO: ProcessCDR(1,14560329,1,1,2)  
[2025-02-26 07:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:45:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560329', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560329', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:45:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:45:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:45:20] Production.INFO: ==10322== Releasing lock...  
[2025-02-26 07:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:45:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:46:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:46:04
    [end_date_ymd] => 2025-02-26 07:46:04
    [RateCDR] => 1
)
  
[2025-02-26 07:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:46:04' and `end` < '2025-02-26 07:46:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:46:16] Production.INFO: count ==229  
[2025-02-26 07:46:16] Production.ERROR: pbx CDR StartTime 2025-02-26 04:46:04 - End Time 2025-02-26 07:46:04  
[2025-02-26 07:46:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:46:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560334', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:46:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560334', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:46:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560334', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:46:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560334', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:46:16] Production.INFO: ProcessCDR(1,14560334,1,1,2)  
[2025-02-26 07:46:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:46:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:46:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560334', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560334', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:46:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:46:20] Production.INFO: ==10410== Releasing lock...  
[2025-02-26 07:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:46:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:47:05
    [end_date_ymd] => 2025-02-26 07:47:05
    [RateCDR] => 1
)
  
[2025-02-26 07:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:47:05' and `end` < '2025-02-26 07:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:47:17] Production.INFO: count ==231  
[2025-02-26 07:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:47:05 - End Time 2025-02-26 07:47:05  
[2025-02-26 07:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560339', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560339', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560339', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560339', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:47:17] Production.INFO: ProcessCDR(1,14560339,1,1,2)  
[2025-02-26 07:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560339', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560339', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:47:20] Production.INFO: ==10490== Releasing lock...  
[2025-02-26 07:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:47:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:48:05
    [end_date_ymd] => 2025-02-26 07:48:05
    [RateCDR] => 1
)
  
[2025-02-26 07:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:48:05' and `end` < '2025-02-26 07:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:48:17] Production.INFO: count ==233  
[2025-02-26 07:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:48:05 - End Time 2025-02-26 07:48:05  
[2025-02-26 07:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560344', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560344', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:48:17] Production.INFO: ProcessCDR(1,14560344,1,1,2)  
[2025-02-26 07:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:48:20] Production.INFO: ==10578== Releasing lock...  
[2025-02-26 07:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:48:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:49:06
    [end_date_ymd] => 2025-02-26 07:49:06
    [RateCDR] => 1
)
  
[2025-02-26 07:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:49:06' and `end` < '2025-02-26 07:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:49:17] Production.INFO: count ==233  
[2025-02-26 07:49:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:49:06 - End Time 2025-02-26 07:49:06  
[2025-02-26 07:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560349', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560349', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:49:18] Production.INFO: ProcessCDR(1,14560349,1,1,2)  
[2025-02-26 07:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:49:21] Production.INFO: ==10665== Releasing lock...  
[2025-02-26 07:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:49:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:50:06
    [end_date_ymd] => 2025-02-26 07:50:06
    [RateCDR] => 1
)
  
[2025-02-26 07:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:50:06' and `end` < '2025-02-26 07:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:50:18] Production.INFO: count ==239  
[2025-02-26 07:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:50:06 - End Time 2025-02-26 07:50:06  
[2025-02-26 07:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560355', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560355', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560355', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560355', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:50:18] Production.INFO: ProcessCDR(1,14560355,1,1,2)  
[2025-02-26 07:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560355', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560355', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:50:21] Production.INFO: ==10746== Releasing lock...  
[2025-02-26 07:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:50:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 07:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:51:05
    [end_date_ymd] => 2025-02-26 07:51:05
    [RateCDR] => 1
)
  
[2025-02-26 07:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:51:05' and `end` < '2025-02-26 07:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:51:17] Production.INFO: count ==239  
[2025-02-26 07:51:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:51:05 - End Time 2025-02-26 07:51:05  
[2025-02-26 07:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560360', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560360', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560360', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560360', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:51:17] Production.INFO: ProcessCDR(1,14560360,1,1,2)  
[2025-02-26 07:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560360', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560360', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:51:20] Production.INFO: ==10833== Releasing lock...  
[2025-02-26 07:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:51:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-02-26 07:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:52:05
    [end_date_ymd] => 2025-02-26 07:52:05
    [RateCDR] => 1
)
  
[2025-02-26 07:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:52:05' and `end` < '2025-02-26 07:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:52:17] Production.INFO: count ==241  
[2025-02-26 07:52:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:52:05 - End Time 2025-02-26 07:52:05  
[2025-02-26 07:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560365', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560365', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560365', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560365', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:52:17] Production.INFO: ProcessCDR(1,14560365,1,1,2)  
[2025-02-26 07:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560365', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560365', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:52:22] Production.INFO: ==10921== Releasing lock...  
[2025-02-26 07:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:52:22] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:53:05
    [end_date_ymd] => 2025-02-26 07:53:05
    [RateCDR] => 1
)
  
[2025-02-26 07:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:53:05' and `end` < '2025-02-26 07:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:53:17] Production.INFO: count ==246  
[2025-02-26 07:53:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:53:05 - End Time 2025-02-26 07:53:05  
[2025-02-26 07:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560370', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560370', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560370', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560370', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:53:17] Production.INFO: ProcessCDR(1,14560370,1,1,2)  
[2025-02-26 07:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560370', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560370', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:53:21] Production.INFO: ==11003== Releasing lock...  
[2025-02-26 07:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:53:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:54:05
    [end_date_ymd] => 2025-02-26 07:54:05
    [RateCDR] => 1
)
  
[2025-02-26 07:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:54:05' and `end` < '2025-02-26 07:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:54:17] Production.INFO: count ==247  
[2025-02-26 07:54:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:54:05 - End Time 2025-02-26 07:54:05  
[2025-02-26 07:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560375', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560375', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:54:17] Production.INFO: ProcessCDR(1,14560375,1,1,2)  
[2025-02-26 07:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:54:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:54:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:54:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:54:20] Production.INFO: ==11087== Releasing lock...  
[2025-02-26 07:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:54:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:55:05
    [end_date_ymd] => 2025-02-26 07:55:05
    [RateCDR] => 1
)
  
[2025-02-26 07:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:55:05' and `end` < '2025-02-26 07:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:55:17] Production.INFO: count ==247  
[2025-02-26 07:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:55:05 - End Time 2025-02-26 07:55:05  
[2025-02-26 07:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560380', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560380', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:55:17] Production.INFO: ProcessCDR(1,14560380,1,1,2)  
[2025-02-26 07:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:55:20] Production.INFO: ==11166== Releasing lock...  
[2025-02-26 07:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:55:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:56:06
    [end_date_ymd] => 2025-02-26 07:56:06
    [RateCDR] => 1
)
  
[2025-02-26 07:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:56:06' and `end` < '2025-02-26 07:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:56:18] Production.INFO: count ==252  
[2025-02-26 07:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:56:06 - End Time 2025-02-26 07:56:06  
[2025-02-26 07:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560385', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560385', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:56:18] Production.INFO: ProcessCDR(1,14560385,1,1,2)  
[2025-02-26 07:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:56:21] Production.INFO: ==11253== Releasing lock...  
[2025-02-26 07:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:56:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:57:05
    [end_date_ymd] => 2025-02-26 07:57:05
    [RateCDR] => 1
)
  
[2025-02-26 07:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:57:05' and `end` < '2025-02-26 07:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:57:17] Production.INFO: count ==253  
[2025-02-26 07:57:17] Production.ERROR: pbx CDR StartTime 2025-02-26 04:57:05 - End Time 2025-02-26 07:57:05  
[2025-02-26 07:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560390', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560390', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560390', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560390', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:57:17] Production.INFO: ProcessCDR(1,14560390,1,1,2)  
[2025-02-26 07:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560390', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560390', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:57:22] Production.INFO: ==11339== Releasing lock...  
[2025-02-26 07:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:57:22] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:58:06
    [end_date_ymd] => 2025-02-26 07:58:06
    [RateCDR] => 1
)
  
[2025-02-26 07:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:58:06' and `end` < '2025-02-26 07:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:58:18] Production.INFO: count ==253  
[2025-02-26 07:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 04:58:06 - End Time 2025-02-26 07:58:06  
[2025-02-26 07:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560395', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560395', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560395', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560395', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:58:18] Production.INFO: ProcessCDR(1,14560395,1,1,2)  
[2025-02-26 07:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560395', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560395', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:58:21] Production.INFO: ==11456== Releasing lock...  
[2025-02-26 07:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:58:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 07:59:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 04:59:04
    [end_date_ymd] => 2025-02-26 07:59:04
    [RateCDR] => 1
)
  
[2025-02-26 07:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 04:59:04' and `end` < '2025-02-26 07:59:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 07:59:16] Production.INFO: count ==255  
[2025-02-26 07:59:16] Production.ERROR: pbx CDR StartTime 2025-02-26 04:59:04 - End Time 2025-02-26 07:59:04  
[2025-02-26 07:59:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 07:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560400', 'tblTempVendorCDR_20' ) start  
[2025-02-26 07:59:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560400', 'tblTempVendorCDR_20' ) end  
[2025-02-26 07:59:16] Production.INFO: ProcessCDR(1,14560400,1,1,2)  
[2025-02-26 07:59:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 07:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 07:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 07:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 07:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 07:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 07:59:21] Production.INFO: ==11538== Releasing lock...  
[2025-02-26 07:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 07:59:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 08:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:00:06
    [end_date_ymd] => 2025-02-26 08:00:06
    [RateCDR] => 1
)
  
[2025-02-26 08:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:00:06' and `end` < '2025-02-26 08:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:00:18] Production.INFO: count ==256  
[2025-02-26 08:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:00:06 - End Time 2025-02-26 08:00:06  
[2025-02-26 08:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560406', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560406', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560406', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560406', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:00:18] Production.INFO: ProcessCDR(1,14560406,1,1,2)  
[2025-02-26 08:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560406', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560406', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:00:23] Production.INFO: ==11623== Releasing lock...  
[2025-02-26 08:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:00:23] Production.INFO: 29.75 MB  #Memory Used#   
[2025-02-26 08:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:01:05
    [end_date_ymd] => 2025-02-26 08:01:05
    [RateCDR] => 1
)
  
[2025-02-26 08:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:01:05' and `end` < '2025-02-26 08:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:01:17] Production.INFO: count ==275  
[2025-02-26 08:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:01:05 - End Time 2025-02-26 08:01:05  
[2025-02-26 08:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560411', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560411', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560411', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560411', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:01:17] Production.INFO: ProcessCDR(1,14560411,1,1,2)  
[2025-02-26 08:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560411', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560411', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:01:21] Production.INFO: ==11722== Releasing lock...  
[2025-02-26 08:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:01:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 08:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:02:05
    [end_date_ymd] => 2025-02-26 08:02:05
    [RateCDR] => 1
)
  
[2025-02-26 08:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:02:05' and `end` < '2025-02-26 08:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:02:17] Production.INFO: count ==275  
[2025-02-26 08:02:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:02:05 - End Time 2025-02-26 08:02:05  
[2025-02-26 08:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560416', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560416', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560416', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560416', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:02:17] Production.INFO: ProcessCDR(1,14560416,1,1,2)  
[2025-02-26 08:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560416', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560416', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:02:21] Production.INFO: ==11807== Releasing lock...  
[2025-02-26 08:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:02:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 08:03:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:03:04
    [end_date_ymd] => 2025-02-26 08:03:04
    [RateCDR] => 1
)
  
[2025-02-26 08:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:03:04' and `end` < '2025-02-26 08:03:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:03:16] Production.INFO: count ==277  
[2025-02-26 08:03:16] Production.ERROR: pbx CDR StartTime 2025-02-26 05:03:04 - End Time 2025-02-26 08:03:04  
[2025-02-26 08:03:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:03:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560421', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:03:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560421', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:03:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560421', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:03:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560421', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:03:16] Production.INFO: ProcessCDR(1,14560421,1,1,2)  
[2025-02-26 08:03:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560421', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560421', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:03:21] Production.INFO: ==11884== Releasing lock...  
[2025-02-26 08:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:03:21] Production.INFO: 30 MB  #Memory Used#   
[2025-02-26 08:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:04:05
    [end_date_ymd] => 2025-02-26 08:04:05
    [RateCDR] => 1
)
  
[2025-02-26 08:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:04:05' and `end` < '2025-02-26 08:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:04:17] Production.INFO: count ==278  
[2025-02-26 08:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:04:05 - End Time 2025-02-26 08:04:05  
[2025-02-26 08:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560426', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560426', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:04:17] Production.INFO: ProcessCDR(1,14560426,1,1,2)  
[2025-02-26 08:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:04:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:04:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:04:21] Production.INFO: ==11976== Releasing lock...  
[2025-02-26 08:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:04:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:05:05
    [end_date_ymd] => 2025-02-26 08:05:05
    [RateCDR] => 1
)
  
[2025-02-26 08:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:05:05' and `end` < '2025-02-26 08:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:05:16] Production.INFO: count ==279  
[2025-02-26 08:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:05:05 - End Time 2025-02-26 08:05:05  
[2025-02-26 08:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560431', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560431', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:05:17] Production.INFO: ProcessCDR(1,14560431,1,1,2)  
[2025-02-26 08:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:05:21] Production.INFO: ==12052== Releasing lock...  
[2025-02-26 08:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:05:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:06:05
    [end_date_ymd] => 2025-02-26 08:06:05
    [RateCDR] => 1
)
  
[2025-02-26 08:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:06:05' and `end` < '2025-02-26 08:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:06:17] Production.INFO: count ==279  
[2025-02-26 08:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:06:05 - End Time 2025-02-26 08:06:05  
[2025-02-26 08:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560436', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560436', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560436', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560436', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:06:17] Production.INFO: ProcessCDR(1,14560436,1,1,2)  
[2025-02-26 08:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:06:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560436', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560436', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:06:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:06:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:06:20] Production.INFO: ==12132== Releasing lock...  
[2025-02-26 08:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:06:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:07:06
    [end_date_ymd] => 2025-02-26 08:07:06
    [RateCDR] => 1
)
  
[2025-02-26 08:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:07:06' and `end` < '2025-02-26 08:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:07:18] Production.INFO: count ==286  
[2025-02-26 08:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:07:06 - End Time 2025-02-26 08:07:06  
[2025-02-26 08:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560441', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560441', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560441', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560441', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:07:18] Production.INFO: ProcessCDR(1,14560441,1,1,2)  
[2025-02-26 08:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:07:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:07:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560441', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560441', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:07:22] Production.INFO: ==12217== Releasing lock...  
[2025-02-26 08:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:07:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-02-26 08:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:08:05
    [end_date_ymd] => 2025-02-26 08:08:05
    [RateCDR] => 1
)
  
[2025-02-26 08:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:08:05' and `end` < '2025-02-26 08:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:08:17] Production.INFO: count ==287  
[2025-02-26 08:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:08:05 - End Time 2025-02-26 08:08:05  
[2025-02-26 08:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560446', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560446', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:08:17] Production.INFO: ProcessCDR(1,14560446,1,1,2)  
[2025-02-26 08:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:08:20] Production.INFO: ==12304== Releasing lock...  
[2025-02-26 08:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:08:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:09:05
    [end_date_ymd] => 2025-02-26 08:09:05
    [RateCDR] => 1
)
  
[2025-02-26 08:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:09:05' and `end` < '2025-02-26 08:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:09:17] Production.INFO: count ==288  
[2025-02-26 08:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:09:05 - End Time 2025-02-26 08:09:05  
[2025-02-26 08:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560451', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560451', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:09:17] Production.INFO: ProcessCDR(1,14560451,1,1,2)  
[2025-02-26 08:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:09:20] Production.INFO: ==12385== Releasing lock...  
[2025-02-26 08:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:09:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:10:06
    [end_date_ymd] => 2025-02-26 08:10:06
    [RateCDR] => 1
)
  
[2025-02-26 08:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:10:06' and `end` < '2025-02-26 08:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:10:18] Production.INFO: count ==296  
[2025-02-26 08:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:10:06 - End Time 2025-02-26 08:10:06  
[2025-02-26 08:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560457', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560457', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560457', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560457', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:10:18] Production.INFO: ProcessCDR(1,14560457,1,1,2)  
[2025-02-26 08:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560457', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560457', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:10:21] Production.INFO: ==12462== Releasing lock...  
[2025-02-26 08:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:10:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 08:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:11:05
    [end_date_ymd] => 2025-02-26 08:11:05
    [RateCDR] => 1
)
  
[2025-02-26 08:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:11:05' and `end` < '2025-02-26 08:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:11:17] Production.INFO: count ==324  
[2025-02-26 08:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:11:05 - End Time 2025-02-26 08:11:05  
[2025-02-26 08:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560462', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560462', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560462', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560462', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:11:17] Production.INFO: ProcessCDR(1,14560462,1,1,2)  
[2025-02-26 08:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560462', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560462', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:11:21] Production.INFO: ==12544== Releasing lock...  
[2025-02-26 08:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:11:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:12:05
    [end_date_ymd] => 2025-02-26 08:12:05
    [RateCDR] => 1
)
  
[2025-02-26 08:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:12:05' and `end` < '2025-02-26 08:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:12:16] Production.INFO: count ==336  
[2025-02-26 08:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:12:05 - End Time 2025-02-26 08:12:05  
[2025-02-26 08:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560467', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560467', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560467', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560467', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:12:17] Production.INFO: ProcessCDR(1,14560467,1,1,2)  
[2025-02-26 08:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560467', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560467', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:12:21] Production.INFO: ==12626== Releasing lock...  
[2025-02-26 08:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:12:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:13:05
    [end_date_ymd] => 2025-02-26 08:13:05
    [RateCDR] => 1
)
  
[2025-02-26 08:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:13:05' and `end` < '2025-02-26 08:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:13:17] Production.INFO: count ==336  
[2025-02-26 08:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:13:05 - End Time 2025-02-26 08:13:05  
[2025-02-26 08:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560472', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560472', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560472', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560472', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:13:17] Production.INFO: ProcessCDR(1,14560472,1,1,2)  
[2025-02-26 08:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560472', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560472', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:13:21] Production.INFO: ==12702== Releasing lock...  
[2025-02-26 08:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:13:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-02-26 08:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:14:05
    [end_date_ymd] => 2025-02-26 08:14:05
    [RateCDR] => 1
)
  
[2025-02-26 08:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:14:05' and `end` < '2025-02-26 08:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:14:17] Production.INFO: count ==343  
[2025-02-26 08:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:14:05 - End Time 2025-02-26 08:14:05  
[2025-02-26 08:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560477', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560477', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:14:17] Production.INFO: ProcessCDR(1,14560477,1,1,2)  
[2025-02-26 08:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:14:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:14:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:14:21] Production.INFO: ==12820== Releasing lock...  
[2025-02-26 08:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:14:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 08:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:15:05
    [end_date_ymd] => 2025-02-26 08:15:05
    [RateCDR] => 1
)
  
[2025-02-26 08:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:15:05' and `end` < '2025-02-26 08:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:15:17] Production.INFO: count ==343  
[2025-02-26 08:15:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:15:05 - End Time 2025-02-26 08:15:05  
[2025-02-26 08:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560482', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560482', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:15:17] Production.INFO: ProcessCDR(1,14560482,1,1,2)  
[2025-02-26 08:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:15:20] Production.INFO: ==12897== Releasing lock...  
[2025-02-26 08:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:15:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 08:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:16:05
    [end_date_ymd] => 2025-02-26 08:16:05
    [RateCDR] => 1
)
  
[2025-02-26 08:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:16:05' and `end` < '2025-02-26 08:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:16:17] Production.INFO: count ==349  
[2025-02-26 08:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:16:05 - End Time 2025-02-26 08:16:05  
[2025-02-26 08:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560487', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560487', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:16:17] Production.INFO: ProcessCDR(1,14560487,1,1,2)  
[2025-02-26 08:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:16:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:16:22] Production.INFO: ==12974== Releasing lock...  
[2025-02-26 08:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:16:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-02-26 08:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:17:05
    [end_date_ymd] => 2025-02-26 08:17:05
    [RateCDR] => 1
)
  
[2025-02-26 08:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:17:05' and `end` < '2025-02-26 08:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:17:17] Production.INFO: count ==353  
[2025-02-26 08:17:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:17:05 - End Time 2025-02-26 08:17:05  
[2025-02-26 08:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560492', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560492', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560492', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560492', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:17:17] Production.INFO: ProcessCDR(1,14560492,1,1,2)  
[2025-02-26 08:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:17:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560492', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560492', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:17:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:17:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:17:22] Production.INFO: ==13051== Releasing lock...  
[2025-02-26 08:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:17:22] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 08:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:18:05
    [end_date_ymd] => 2025-02-26 08:18:05
    [RateCDR] => 1
)
  
[2025-02-26 08:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:18:05' and `end` < '2025-02-26 08:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:18:17] Production.INFO: count ==365  
[2025-02-26 08:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:18:05 - End Time 2025-02-26 08:18:05  
[2025-02-26 08:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560497', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560497', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:18:17] Production.INFO: ProcessCDR(1,14560497,1,1,2)  
[2025-02-26 08:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:18:22] Production.INFO: ==13140== Releasing lock...  
[2025-02-26 08:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:18:22] Production.INFO: 31 MB  #Memory Used#   
[2025-02-26 08:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:19:05
    [end_date_ymd] => 2025-02-26 08:19:05
    [RateCDR] => 1
)
  
[2025-02-26 08:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:19:05' and `end` < '2025-02-26 08:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:19:17] Production.INFO: count ==371  
[2025-02-26 08:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:19:05 - End Time 2025-02-26 08:19:05  
[2025-02-26 08:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560502', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560502', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:19:17] Production.INFO: ProcessCDR(1,14560502,1,1,2)  
[2025-02-26 08:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:19:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:19:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:19:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:19:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:19:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:19:22] Production.INFO: ==13221== Releasing lock...  
[2025-02-26 08:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:19:22] Production.INFO: 31.5 MB  #Memory Used#   
[2025-02-26 08:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:20:06
    [end_date_ymd] => 2025-02-26 08:20:06
    [RateCDR] => 1
)
  
[2025-02-26 08:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:20:06' and `end` < '2025-02-26 08:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:20:18] Production.INFO: count ==377  
[2025-02-26 08:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:20:06 - End Time 2025-02-26 08:20:06  
[2025-02-26 08:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560508', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560508', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560508', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560508', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:20:18] Production.INFO: ProcessCDR(1,14560508,1,1,2)  
[2025-02-26 08:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560508', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560508', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:20:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:20:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:20:23] Production.INFO: ==13301== Releasing lock...  
[2025-02-26 08:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:20:23] Production.INFO: 31.25 MB  #Memory Used#   
[2025-02-26 08:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:21:05
    [end_date_ymd] => 2025-02-26 08:21:05
    [RateCDR] => 1
)
  
[2025-02-26 08:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:21:05' and `end` < '2025-02-26 08:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:21:17] Production.INFO: count ==402  
[2025-02-26 08:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:21:05 - End Time 2025-02-26 08:21:05  
[2025-02-26 08:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560513', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560513', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560513', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560513', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:21:17] Production.INFO: ProcessCDR(1,14560513,1,1,2)  
[2025-02-26 08:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560513', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560513', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:21:20] Production.INFO: ==13386== Releasing lock...  
[2025-02-26 08:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:21:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 08:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:22:06
    [end_date_ymd] => 2025-02-26 08:22:06
    [RateCDR] => 1
)
  
[2025-02-26 08:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:22:06' and `end` < '2025-02-26 08:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:22:17] Production.INFO: count ==421  
[2025-02-26 08:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:22:06 - End Time 2025-02-26 08:22:06  
[2025-02-26 08:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560518', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560518', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560518', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560518', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:22:18] Production.INFO: ProcessCDR(1,14560518,1,1,2)  
[2025-02-26 08:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560518', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560518', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:22:22] Production.INFO: ==13473== Releasing lock...  
[2025-02-26 08:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:22:22] Production.INFO: 31.5 MB  #Memory Used#   
[2025-02-26 08:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:23:05
    [end_date_ymd] => 2025-02-26 08:23:05
    [RateCDR] => 1
)
  
[2025-02-26 08:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:23:05' and `end` < '2025-02-26 08:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:23:17] Production.INFO: count ==429  
[2025-02-26 08:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:23:05 - End Time 2025-02-26 08:23:05  
[2025-02-26 08:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560523', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560523', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560523', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560523', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:23:17] Production.INFO: ProcessCDR(1,14560523,1,1,2)  
[2025-02-26 08:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:23:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:23:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:23:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560523', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560523', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:23:22] Production.INFO: ==13557== Releasing lock...  
[2025-02-26 08:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:23:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 08:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:24:06
    [end_date_ymd] => 2025-02-26 08:24:06
    [RateCDR] => 1
)
  
[2025-02-26 08:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:24:06' and `end` < '2025-02-26 08:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:24:17] Production.INFO: count ==430  
[2025-02-26 08:24:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:24:06 - End Time 2025-02-26 08:24:06  
[2025-02-26 08:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560528', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560528', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560528', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560528', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:24:18] Production.INFO: ProcessCDR(1,14560528,1,1,2)  
[2025-02-26 08:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560528', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560528', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:24:21] Production.INFO: ==13644== Releasing lock...  
[2025-02-26 08:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:24:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 08:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:25:05
    [end_date_ymd] => 2025-02-26 08:25:05
    [RateCDR] => 1
)
  
[2025-02-26 08:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:25:05' and `end` < '2025-02-26 08:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:25:17] Production.INFO: count ==437  
[2025-02-26 08:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:25:05 - End Time 2025-02-26 08:25:05  
[2025-02-26 08:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560533', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560533', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:25:17] Production.INFO: ProcessCDR(1,14560533,1,1,2)  
[2025-02-26 08:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:25:20] Production.INFO: ==13728== Releasing lock...  
[2025-02-26 08:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:25:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 08:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:26:05
    [end_date_ymd] => 2025-02-26 08:26:05
    [RateCDR] => 1
)
  
[2025-02-26 08:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:26:05' and `end` < '2025-02-26 08:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:26:17] Production.INFO: count ==442  
[2025-02-26 08:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:26:05 - End Time 2025-02-26 08:26:05  
[2025-02-26 08:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560538', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560538', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560538', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560538', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:26:17] Production.INFO: ProcessCDR(1,14560538,1,1,2)  
[2025-02-26 08:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560538', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560538', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:26:22] Production.INFO: ==13809== Releasing lock...  
[2025-02-26 08:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:26:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-02-26 08:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:27:05
    [end_date_ymd] => 2025-02-26 08:27:05
    [RateCDR] => 1
)
  
[2025-02-26 08:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:27:05' and `end` < '2025-02-26 08:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:27:17] Production.INFO: count ==450  
[2025-02-26 08:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:27:05 - End Time 2025-02-26 08:27:05  
[2025-02-26 08:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560543', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560543', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560543', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560543', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:27:17] Production.INFO: ProcessCDR(1,14560543,1,1,2)  
[2025-02-26 08:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560543', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560543', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:27:22] Production.INFO: ==13891== Releasing lock...  
[2025-02-26 08:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:27:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-02-26 08:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:28:05
    [end_date_ymd] => 2025-02-26 08:28:05
    [RateCDR] => 1
)
  
[2025-02-26 08:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:28:05' and `end` < '2025-02-26 08:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:28:17] Production.INFO: count ==457  
[2025-02-26 08:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:28:05 - End Time 2025-02-26 08:28:05  
[2025-02-26 08:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560548', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560548', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560548', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560548', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:28:17] Production.INFO: ProcessCDR(1,14560548,1,1,2)  
[2025-02-26 08:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560548', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560548', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:28:22] Production.INFO: ==13970== Releasing lock...  
[2025-02-26 08:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:28:22] Production.INFO: 32 MB  #Memory Used#   
[2025-02-26 08:29:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:29:04
    [end_date_ymd] => 2025-02-26 08:29:04
    [RateCDR] => 1
)
  
[2025-02-26 08:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:29:04' and `end` < '2025-02-26 08:29:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:29:16] Production.INFO: count ==465  
[2025-02-26 08:29:16] Production.ERROR: pbx CDR StartTime 2025-02-26 05:29:04 - End Time 2025-02-26 08:29:04  
[2025-02-26 08:29:16] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:29:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:29:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:29:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560553', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:29:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560553', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:29:16] Production.INFO: ProcessCDR(1,14560553,1,1,2)  
[2025-02-26 08:29:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:29:17] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:29:17] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:29:20] Production.INFO: ==14091== Releasing lock...  
[2025-02-26 08:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:29:20] Production.INFO: 32 MB  #Memory Used#   
[2025-02-26 08:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:30:06
    [end_date_ymd] => 2025-02-26 08:30:06
    [RateCDR] => 1
)
  
[2025-02-26 08:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:30:06' and `end` < '2025-02-26 08:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:30:18] Production.INFO: count ==484  
[2025-02-26 08:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:30:06 - End Time 2025-02-26 08:30:06  
[2025-02-26 08:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560558', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560558', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:30:18] Production.INFO: ProcessCDR(1,14560558,1,1,2)  
[2025-02-26 08:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:30:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:30:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:30:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:30:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:30:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:30:23] Production.INFO: ==14178== Releasing lock...  
[2025-02-26 08:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:30:23] Production.INFO: 32.5 MB  #Memory Used#   
[2025-02-26 08:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:31:05
    [end_date_ymd] => 2025-02-26 08:31:05
    [RateCDR] => 1
)
  
[2025-02-26 08:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:31:05' and `end` < '2025-02-26 08:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:31:17] Production.INFO: count ==502  
[2025-02-26 08:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:31:05 - End Time 2025-02-26 08:31:05  
[2025-02-26 08:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560564', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560564', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560564', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560564', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:31:17] Production.INFO: ProcessCDR(1,14560564,1,1,2)  
[2025-02-26 08:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:31:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:31:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:31:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560564', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560564', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:31:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:31:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:31:22] Production.INFO: ==14258== Releasing lock...  
[2025-02-26 08:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:31:22] Production.INFO: 32.5 MB  #Memory Used#   
[2025-02-26 08:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:32:05
    [end_date_ymd] => 2025-02-26 08:32:05
    [RateCDR] => 1
)
  
[2025-02-26 08:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:32:05' and `end` < '2025-02-26 08:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:32:17] Production.INFO: count ==517  
[2025-02-26 08:32:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:32:05 - End Time 2025-02-26 08:32:05  
[2025-02-26 08:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560569', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560569', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560569', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560569', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:32:17] Production.INFO: ProcessCDR(1,14560569,1,1,2)  
[2025-02-26 08:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:32:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:32:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:32:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:32:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560569', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:32:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560569', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:32:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:32:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:32:23] Production.INFO: ==14344== Releasing lock...  
[2025-02-26 08:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:32:23] Production.INFO: 32.25 MB  #Memory Used#   
[2025-02-26 08:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:33:05
    [end_date_ymd] => 2025-02-26 08:33:05
    [RateCDR] => 1
)
  
[2025-02-26 08:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:33:05' and `end` < '2025-02-26 08:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:33:17] Production.INFO: count ==520  
[2025-02-26 08:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:33:05 - End Time 2025-02-26 08:33:05  
[2025-02-26 08:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560574', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560574', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560574', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560574', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:33:17] Production.INFO: ProcessCDR(1,14560574,1,1,2)  
[2025-02-26 08:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560574', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560574', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:33:22] Production.INFO: ==14424== Releasing lock...  
[2025-02-26 08:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:33:22] Production.INFO: 32.75 MB  #Memory Used#   
[2025-02-26 08:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:34:05
    [end_date_ymd] => 2025-02-26 08:34:05
    [RateCDR] => 1
)
  
[2025-02-26 08:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:34:05' and `end` < '2025-02-26 08:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:34:17] Production.INFO: count ==535  
[2025-02-26 08:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:34:05 - End Time 2025-02-26 08:34:05  
[2025-02-26 08:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560579', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560579', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560579', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560579', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:34:17] Production.INFO: ProcessCDR(1,14560579,1,1,2)  
[2025-02-26 08:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:34:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:34:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:34:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560579', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560579', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:34:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:34:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:34:22] Production.INFO: ==14505== Releasing lock...  
[2025-02-26 08:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:34:22] Production.INFO: 32.5 MB  #Memory Used#   
[2025-02-26 08:35:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:35:04
    [end_date_ymd] => 2025-02-26 08:35:04
    [RateCDR] => 1
)
  
[2025-02-26 08:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:35:04' and `end` < '2025-02-26 08:35:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:35:16] Production.INFO: count ==535  
[2025-02-26 08:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:35:04 - End Time 2025-02-26 08:35:04  
[2025-02-26 08:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560584', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560584', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:35:17] Production.INFO: ProcessCDR(1,14560584,1,1,2)  
[2025-02-26 08:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:35:20] Production.INFO: ==14595== Releasing lock...  
[2025-02-26 08:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:35:20] Production.INFO: 32.5 MB  #Memory Used#   
[2025-02-26 08:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:36:06
    [end_date_ymd] => 2025-02-26 08:36:06
    [RateCDR] => 1
)
  
[2025-02-26 08:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:36:06' and `end` < '2025-02-26 08:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:36:18] Production.INFO: count ==545  
[2025-02-26 08:36:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:36:06 - End Time 2025-02-26 08:36:06  
[2025-02-26 08:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560589', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560589', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:36:18] Production.INFO: ProcessCDR(1,14560589,1,1,2)  
[2025-02-26 08:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:36:21] Production.INFO: ==14678== Releasing lock...  
[2025-02-26 08:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:36:21] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 08:37:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:37:04
    [end_date_ymd] => 2025-02-26 08:37:04
    [RateCDR] => 1
)
  
[2025-02-26 08:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:37:04' and `end` < '2025-02-26 08:37:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:37:16] Production.INFO: count ==557  
[2025-02-26 08:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:37:04 - End Time 2025-02-26 08:37:04  
[2025-02-26 08:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560594', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560594', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560594', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560594', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:37:17] Production.INFO: ProcessCDR(1,14560594,1,1,2)  
[2025-02-26 08:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560594', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560594', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:37:21] Production.INFO: ==14762== Releasing lock...  
[2025-02-26 08:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:37:21] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 08:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:38:05
    [end_date_ymd] => 2025-02-26 08:38:05
    [RateCDR] => 1
)
  
[2025-02-26 08:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:38:05' and `end` < '2025-02-26 08:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:38:17] Production.INFO: count ==565  
[2025-02-26 08:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:38:05 - End Time 2025-02-26 08:38:05  
[2025-02-26 08:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560599', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560599', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:38:18] Production.INFO: ProcessCDR(1,14560599,1,1,2)  
[2025-02-26 08:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:38:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:38:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:38:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:38:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:38:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:38:23] Production.INFO: ==14839== Releasing lock...  
[2025-02-26 08:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:38:23] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 08:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:39:05
    [end_date_ymd] => 2025-02-26 08:39:05
    [RateCDR] => 1
)
  
[2025-02-26 08:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:39:05' and `end` < '2025-02-26 08:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:39:17] Production.INFO: count ==573  
[2025-02-26 08:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:39:05 - End Time 2025-02-26 08:39:05  
[2025-02-26 08:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560604', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560604', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560604', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560604', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:39:17] Production.INFO: ProcessCDR(1,14560604,1,1,2)  
[2025-02-26 08:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:39:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:39:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560604', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560604', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:39:22] Production.INFO: ==14917== Releasing lock...  
[2025-02-26 08:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:39:22] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 08:40:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:40:06
    [end_date_ymd] => 2025-02-26 08:40:06
    [RateCDR] => 1
)
  
[2025-02-26 08:40:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:40:06' and `end` < '2025-02-26 08:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:40:18] Production.INFO: count ==579  
[2025-02-26 08:40:19] Production.ERROR: pbx CDR StartTime 2025-02-26 05:40:06 - End Time 2025-02-26 08:40:06  
[2025-02-26 08:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560610', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560610', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560610', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560610', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:40:19] Production.INFO: ProcessCDR(1,14560610,1,1,2)  
[2025-02-26 08:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560610', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560610', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:40:23] Production.INFO: ==15005== Releasing lock...  
[2025-02-26 08:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:40:23] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:41:06
    [end_date_ymd] => 2025-02-26 08:41:06
    [RateCDR] => 1
)
  
[2025-02-26 08:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:41:06' and `end` < '2025-02-26 08:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:41:18] Production.INFO: count ==603  
[2025-02-26 08:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:41:06 - End Time 2025-02-26 08:41:06  
[2025-02-26 08:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560615', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560615', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560615', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560615', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:41:18] Production.INFO: ProcessCDR(1,14560615,1,1,2)  
[2025-02-26 08:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:41:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:41:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:41:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560615', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560615', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:41:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:41:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:41:24] Production.INFO: ==15087== Releasing lock...  
[2025-02-26 08:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:41:24] Production.INFO: 33.75 MB  #Memory Used#   
[2025-02-26 08:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:42:05
    [end_date_ymd] => 2025-02-26 08:42:05
    [RateCDR] => 1
)
  
[2025-02-26 08:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:42:05' and `end` < '2025-02-26 08:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:42:17] Production.INFO: count ==615  
[2025-02-26 08:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:42:05 - End Time 2025-02-26 08:42:05  
[2025-02-26 08:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560620', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560620', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560620', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560620', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:42:17] Production.INFO: ProcessCDR(1,14560620,1,1,2)  
[2025-02-26 08:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560620', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560620', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:42:21] Production.INFO: ==15171== Releasing lock...  
[2025-02-26 08:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:42:21] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 08:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:43:05
    [end_date_ymd] => 2025-02-26 08:43:05
    [RateCDR] => 1
)
  
[2025-02-26 08:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:43:05' and `end` < '2025-02-26 08:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:43:17] Production.INFO: count ==616  
[2025-02-26 08:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:43:05 - End Time 2025-02-26 08:43:05  
[2025-02-26 08:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560625', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560625', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560625', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560625', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:43:17] Production.INFO: ProcessCDR(1,14560625,1,1,2)  
[2025-02-26 08:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560625', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560625', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:43:21] Production.INFO: ==15255== Releasing lock...  
[2025-02-26 08:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:43:21] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:44:05
    [end_date_ymd] => 2025-02-26 08:44:05
    [RateCDR] => 1
)
  
[2025-02-26 08:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:44:05' and `end` < '2025-02-26 08:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:44:17] Production.INFO: count ==617  
[2025-02-26 08:44:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:44:05 - End Time 2025-02-26 08:44:05  
[2025-02-26 08:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560630', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560630', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:44:18] Production.INFO: ProcessCDR(1,14560630,1,1,2)  
[2025-02-26 08:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:44:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:44:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:44:23] Production.INFO: ==15330== Releasing lock...  
[2025-02-26 08:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:44:23] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:45:05
    [end_date_ymd] => 2025-02-26 08:45:05
    [RateCDR] => 1
)
  
[2025-02-26 08:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:45:05' and `end` < '2025-02-26 08:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:45:17] Production.INFO: count ==622  
[2025-02-26 08:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:45:05 - End Time 2025-02-26 08:45:05  
[2025-02-26 08:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560635', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560635', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:45:17] Production.INFO: ProcessCDR(1,14560635,1,1,2)  
[2025-02-26 08:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:45:21] Production.INFO: ==15453== Releasing lock...  
[2025-02-26 08:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:45:21] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:46:05
    [end_date_ymd] => 2025-02-26 08:46:05
    [RateCDR] => 1
)
  
[2025-02-26 08:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:46:05' and `end` < '2025-02-26 08:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:46:17] Production.INFO: count ==623  
[2025-02-26 08:46:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:46:05 - End Time 2025-02-26 08:46:05  
[2025-02-26 08:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560640', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560640', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:46:17] Production.INFO: ProcessCDR(1,14560640,1,1,2)  
[2025-02-26 08:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:46:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:46:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:46:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:46:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:46:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:46:22] Production.INFO: ==15534== Releasing lock...  
[2025-02-26 08:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:46:22] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:47:05
    [end_date_ymd] => 2025-02-26 08:47:05
    [RateCDR] => 1
)
  
[2025-02-26 08:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:47:05' and `end` < '2025-02-26 08:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:47:17] Production.INFO: count ==639  
[2025-02-26 08:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:47:05 - End Time 2025-02-26 08:47:05  
[2025-02-26 08:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560645', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560645', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560645', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560645', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:47:18] Production.INFO: ProcessCDR(1,14560645,1,1,2)  
[2025-02-26 08:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560645', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560645', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:47:21] Production.INFO: ==15612== Releasing lock...  
[2025-02-26 08:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:47:21] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:48:06
    [end_date_ymd] => 2025-02-26 08:48:06
    [RateCDR] => 1
)
  
[2025-02-26 08:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:48:06' and `end` < '2025-02-26 08:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:48:18] Production.INFO: count ==647  
[2025-02-26 08:48:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:48:06 - End Time 2025-02-26 08:48:06  
[2025-02-26 08:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560650', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560650', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:48:18] Production.INFO: ProcessCDR(1,14560650,1,1,2)  
[2025-02-26 08:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:48:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:48:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:48:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:48:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:48:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:48:24] Production.INFO: ==15696== Releasing lock...  
[2025-02-26 08:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:48:24] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:49:06
    [end_date_ymd] => 2025-02-26 08:49:06
    [RateCDR] => 1
)
  
[2025-02-26 08:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:49:06' and `end` < '2025-02-26 08:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:49:18] Production.INFO: count ==660  
[2025-02-26 08:49:19] Production.ERROR: pbx CDR StartTime 2025-02-26 05:49:06 - End Time 2025-02-26 08:49:06  
[2025-02-26 08:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560655', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560655', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:49:19] Production.INFO: ProcessCDR(1,14560655,1,1,2)  
[2025-02-26 08:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:49:24] Production.INFO: ==15774== Releasing lock...  
[2025-02-26 08:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:49:24] Production.INFO: 33.75 MB  #Memory Used#   
[2025-02-26 08:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:50:06
    [end_date_ymd] => 2025-02-26 08:50:06
    [RateCDR] => 1
)
  
[2025-02-26 08:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:50:06' and `end` < '2025-02-26 08:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:50:18] Production.INFO: count ==668  
[2025-02-26 08:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:50:06 - End Time 2025-02-26 08:50:06  
[2025-02-26 08:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560661', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560661', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560661', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560661', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:50:18] Production.INFO: ProcessCDR(1,14560661,1,1,2)  
[2025-02-26 08:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:50:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:50:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:50:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:50:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560661', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560661', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:50:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:50:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:50:24] Production.INFO: ==15858== Releasing lock...  
[2025-02-26 08:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:50:24] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:51:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:51:07
    [end_date_ymd] => 2025-02-26 08:51:07
    [RateCDR] => 1
)
  
[2025-02-26 08:51:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:51:07' and `end` < '2025-02-26 08:51:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:51:19] Production.INFO: count ==702  
[2025-02-26 08:51:19] Production.ERROR: pbx CDR StartTime 2025-02-26 05:51:07 - End Time 2025-02-26 08:51:07  
[2025-02-26 08:51:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560666', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560666', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560666', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560666', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:51:19] Production.INFO: ProcessCDR(1,14560666,1,1,2)  
[2025-02-26 08:51:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:51:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:51:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:51:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560666', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560666', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:51:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:51:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:51:24] Production.INFO: ==15943== Releasing lock...  
[2025-02-26 08:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:51:24] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 08:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:52:05
    [end_date_ymd] => 2025-02-26 08:52:05
    [RateCDR] => 1
)
  
[2025-02-26 08:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:52:05' and `end` < '2025-02-26 08:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:52:17] Production.INFO: count ==704  
[2025-02-26 08:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:52:05 - End Time 2025-02-26 08:52:05  
[2025-02-26 08:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560671', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560671', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560671', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560671', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:52:18] Production.INFO: ProcessCDR(1,14560671,1,1,2)  
[2025-02-26 08:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:52:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560671', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560671', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:52:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:52:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:52:23] Production.INFO: ==16030== Releasing lock...  
[2025-02-26 08:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:52:23] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 08:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:53:06
    [end_date_ymd] => 2025-02-26 08:53:06
    [RateCDR] => 1
)
  
[2025-02-26 08:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:53:06' and `end` < '2025-02-26 08:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:53:18] Production.INFO: count ==710  
[2025-02-26 08:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:53:06 - End Time 2025-02-26 08:53:06  
[2025-02-26 08:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560676', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560676', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560676', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560676', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:53:18] Production.INFO: ProcessCDR(1,14560676,1,1,2)  
[2025-02-26 08:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:53:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:53:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560676', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560676', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:53:22] Production.INFO: ==16107== Releasing lock...  
[2025-02-26 08:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:53:22] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:54:05
    [end_date_ymd] => 2025-02-26 08:54:05
    [RateCDR] => 1
)
  
[2025-02-26 08:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:54:05' and `end` < '2025-02-26 08:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:54:17] Production.INFO: count ==717  
[2025-02-26 08:54:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:54:05 - End Time 2025-02-26 08:54:05  
[2025-02-26 08:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560681', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560681', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560681', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560681', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:54:17] Production.INFO: ProcessCDR(1,14560681,1,1,2)  
[2025-02-26 08:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560681', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560681', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:54:22] Production.INFO: ==16183== Releasing lock...  
[2025-02-26 08:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:54:22] Production.INFO: 33.75 MB  #Memory Used#   
[2025-02-26 08:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:55:05
    [end_date_ymd] => 2025-02-26 08:55:05
    [RateCDR] => 1
)
  
[2025-02-26 08:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:55:05' and `end` < '2025-02-26 08:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:55:17] Production.INFO: count ==719  
[2025-02-26 08:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:55:05 - End Time 2025-02-26 08:55:05  
[2025-02-26 08:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560686', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560686', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:55:17] Production.INFO: ProcessCDR(1,14560686,1,1,2)  
[2025-02-26 08:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:55:22] Production.INFO: ==16271== Releasing lock...  
[2025-02-26 08:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:55:22] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:56:05
    [end_date_ymd] => 2025-02-26 08:56:05
    [RateCDR] => 1
)
  
[2025-02-26 08:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:56:05' and `end` < '2025-02-26 08:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:56:17] Production.INFO: count ==719  
[2025-02-26 08:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:56:05 - End Time 2025-02-26 08:56:05  
[2025-02-26 08:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560691', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560691', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:56:18] Production.INFO: ProcessCDR(1,14560691,1,1,2)  
[2025-02-26 08:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:56:21] Production.INFO: ==16362== Releasing lock...  
[2025-02-26 08:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:56:21] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:57:06
    [end_date_ymd] => 2025-02-26 08:57:06
    [RateCDR] => 1
)
  
[2025-02-26 08:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:57:06' and `end` < '2025-02-26 08:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:57:18] Production.INFO: count ==722  
[2025-02-26 08:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:57:06 - End Time 2025-02-26 08:57:06  
[2025-02-26 08:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560696', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560696', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:57:18] Production.INFO: ProcessCDR(1,14560696,1,1,2)  
[2025-02-26 08:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:57:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:57:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:57:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:57:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:57:23] Production.INFO: ==16451== Releasing lock...  
[2025-02-26 08:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:57:23] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 08:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:58:05
    [end_date_ymd] => 2025-02-26 08:58:05
    [RateCDR] => 1
)
  
[2025-02-26 08:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:58:05' and `end` < '2025-02-26 08:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:58:17] Production.INFO: count ==725  
[2025-02-26 08:58:17] Production.ERROR: pbx CDR StartTime 2025-02-26 05:58:05 - End Time 2025-02-26 08:58:05  
[2025-02-26 08:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560701', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560701', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:58:17] Production.INFO: ProcessCDR(1,14560701,1,1,2)  
[2025-02-26 08:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:58:22] Production.INFO: ==16530== Releasing lock...  
[2025-02-26 08:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:58:22] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 08:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 05:59:06
    [end_date_ymd] => 2025-02-26 08:59:06
    [RateCDR] => 1
)
  
[2025-02-26 08:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 05:59:06' and `end` < '2025-02-26 08:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 08:59:18] Production.INFO: count ==733  
[2025-02-26 08:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 05:59:06 - End Time 2025-02-26 08:59:06  
[2025-02-26 08:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 08:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560706', 'tblTempVendorCDR_20' ) start  
[2025-02-26 08:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560706', 'tblTempVendorCDR_20' ) end  
[2025-02-26 08:59:18] Production.INFO: ProcessCDR(1,14560706,1,1,2)  
[2025-02-26 08:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 08:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 08:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 08:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 08:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 08:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 08:59:22] Production.INFO: ==16613== Releasing lock...  
[2025-02-26 08:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 08:59:22] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 09:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:00:06
    [end_date_ymd] => 2025-02-26 09:00:06
    [RateCDR] => 1
)
  
[2025-02-26 09:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:00:06' and `end` < '2025-02-26 09:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:00:18] Production.INFO: count ==756  
[2025-02-26 09:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:00:06 - End Time 2025-02-26 09:00:06  
[2025-02-26 09:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560711', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560711', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:00:18] Production.INFO: ProcessCDR(1,14560711,1,1,2)  
[2025-02-26 09:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:00:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:00:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:00:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:00:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:00:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:00:24] Production.INFO: ==16733== Releasing lock...  
[2025-02-26 09:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:00:24] Production.INFO: 33.75 MB  #Memory Used#   
[2025-02-26 09:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:01:05
    [end_date_ymd] => 2025-02-26 09:01:05
    [RateCDR] => 1
)
  
[2025-02-26 09:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:01:05' and `end` < '2025-02-26 09:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:01:17] Production.INFO: count ==793  
[2025-02-26 09:01:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:01:05 - End Time 2025-02-26 09:01:05  
[2025-02-26 09:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560717', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560717', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560717', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560717', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:01:18] Production.INFO: ProcessCDR(1,14560717,1,1,2)  
[2025-02-26 09:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560717', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560717', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:01:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:01:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:01:23] Production.INFO: ==16827== Releasing lock...  
[2025-02-26 09:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:01:23] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 09:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:02:06
    [end_date_ymd] => 2025-02-26 09:02:06
    [RateCDR] => 1
)
  
[2025-02-26 09:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:02:06' and `end` < '2025-02-26 09:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:02:17] Production.INFO: count ==820  
[2025-02-26 09:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:02:06 - End Time 2025-02-26 09:02:06  
[2025-02-26 09:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560722', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560722', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560722', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560722', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:02:18] Production.INFO: ProcessCDR(1,14560722,1,1,2)  
[2025-02-26 09:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560722', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560722', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:02:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:02:23] Production.INFO: ==16909== Releasing lock...  
[2025-02-26 09:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:02:23] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 09:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:03:06
    [end_date_ymd] => 2025-02-26 09:03:06
    [RateCDR] => 1
)
  
[2025-02-26 09:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:03:06' and `end` < '2025-02-26 09:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:03:18] Production.INFO: count ==835  
[2025-02-26 09:03:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:03:06 - End Time 2025-02-26 09:03:06  
[2025-02-26 09:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560727', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560727', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560727', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560727', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:03:19] Production.INFO: ProcessCDR(1,14560727,1,1,2)  
[2025-02-26 09:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:03:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:03:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:03:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560727', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560727', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:03:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:03:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:03:24] Production.INFO: ==16996== Releasing lock...  
[2025-02-26 09:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:03:24] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 09:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:04:05
    [end_date_ymd] => 2025-02-26 09:04:05
    [RateCDR] => 1
)
  
[2025-02-26 09:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:04:05' and `end` < '2025-02-26 09:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:04:18] Production.INFO: count ==842  
[2025-02-26 09:04:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:04:05 - End Time 2025-02-26 09:04:05  
[2025-02-26 09:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560732', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560732', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:04:18] Production.INFO: ProcessCDR(1,14560732,1,1,2)  
[2025-02-26 09:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:04:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:04:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:04:22] Production.INFO: ==17108== Releasing lock...  
[2025-02-26 09:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:04:22] Production.INFO: 34.75 MB  #Memory Used#   
[2025-02-26 09:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:05:05
    [end_date_ymd] => 2025-02-26 09:05:05
    [RateCDR] => 1
)
  
[2025-02-26 09:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:05:05' and `end` < '2025-02-26 09:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:05:17] Production.INFO: count ==865  
[2025-02-26 09:05:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:05:05 - End Time 2025-02-26 09:05:05  
[2025-02-26 09:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560737', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560737', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:05:18] Production.INFO: ProcessCDR(1,14560737,1,1,2)  
[2025-02-26 09:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:05:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:05:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:05:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:05:23] Production.INFO: ==17212== Releasing lock...  
[2025-02-26 09:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:05:23] Production.INFO: 35 MB  #Memory Used#   
[2025-02-26 09:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:06:05
    [end_date_ymd] => 2025-02-26 09:06:05
    [RateCDR] => 1
)
  
[2025-02-26 09:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:06:05' and `end` < '2025-02-26 09:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:06:17] Production.INFO: count ==877  
[2025-02-26 09:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:06:05 - End Time 2025-02-26 09:06:05  
[2025-02-26 09:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560742', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560742', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560742', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560742', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:06:18] Production.INFO: ProcessCDR(1,14560742,1,1,2)  
[2025-02-26 09:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560742', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560742', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:06:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:06:23] Production.INFO: ==17316== Releasing lock...  
[2025-02-26 09:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:06:23] Production.INFO: 34.75 MB  #Memory Used#   
[2025-02-26 09:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:07:06
    [end_date_ymd] => 2025-02-26 09:07:06
    [RateCDR] => 1
)
  
[2025-02-26 09:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:07:06' and `end` < '2025-02-26 09:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:07:18] Production.INFO: count ==891  
[2025-02-26 09:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:07:06 - End Time 2025-02-26 09:07:06  
[2025-02-26 09:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560747', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560747', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560747', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560747', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:07:18] Production.INFO: ProcessCDR(1,14560747,1,1,2)  
[2025-02-26 09:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:07:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:07:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:07:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:07:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560747', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:07:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560747', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:07:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:07:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:07:23] Production.INFO: ==17430== Releasing lock...  
[2025-02-26 09:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:07:23] Production.INFO: 34.5 MB  #Memory Used#   
[2025-02-26 09:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:08:05
    [end_date_ymd] => 2025-02-26 09:08:05
    [RateCDR] => 1
)
  
[2025-02-26 09:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:08:05' and `end` < '2025-02-26 09:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:08:17] Production.INFO: count ==911  
[2025-02-26 09:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:08:05 - End Time 2025-02-26 09:08:05  
[2025-02-26 09:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560752', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560752', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:08:17] Production.INFO: ProcessCDR(1,14560752,1,1,2)  
[2025-02-26 09:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:08:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:08:22] Production.INFO: ==17540== Releasing lock...  
[2025-02-26 09:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:08:22] Production.INFO: 34.75 MB  #Memory Used#   
[2025-02-26 09:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:09:06
    [end_date_ymd] => 2025-02-26 09:09:06
    [RateCDR] => 1
)
  
[2025-02-26 09:09:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:09:06' and `end` < '2025-02-26 09:09:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:09:18] Production.INFO: count ==915  
[2025-02-26 09:09:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:09:06 - End Time 2025-02-26 09:09:06  
[2025-02-26 09:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560757', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560757', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:09:18] Production.INFO: ProcessCDR(1,14560757,1,1,2)  
[2025-02-26 09:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:09:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:09:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:09:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:09:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:09:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:09:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:09:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:09:23] Production.INFO: ==17648== Releasing lock...  
[2025-02-26 09:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:09:23] Production.INFO: 34.75 MB  #Memory Used#   
[2025-02-26 09:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:10:06
    [end_date_ymd] => 2025-02-26 09:10:06
    [RateCDR] => 1
)
  
[2025-02-26 09:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:10:06' and `end` < '2025-02-26 09:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:10:18] Production.INFO: count ==927  
[2025-02-26 09:10:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:10:06 - End Time 2025-02-26 09:10:06  
[2025-02-26 09:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560763', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560763', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560763', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560763', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:10:19] Production.INFO: ProcessCDR(1,14560763,1,1,2)  
[2025-02-26 09:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:10:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:10:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:10:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560763', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560763', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:10:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:10:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:10:23] Production.INFO: ==17755== Releasing lock...  
[2025-02-26 09:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:10:23] Production.INFO: 35 MB  #Memory Used#   
[2025-02-26 09:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:11:06
    [end_date_ymd] => 2025-02-26 09:11:06
    [RateCDR] => 1
)
  
[2025-02-26 09:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:11:06' and `end` < '2025-02-26 09:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:11:18] Production.INFO: count ==955  
[2025-02-26 09:11:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:11:06 - End Time 2025-02-26 09:11:06  
[2025-02-26 09:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560768', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560768', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560768', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560768', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:11:18] Production.INFO: ProcessCDR(1,14560768,1,1,2)  
[2025-02-26 09:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560768', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560768', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:11:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:11:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:11:23] Production.INFO: ==17867== Releasing lock...  
[2025-02-26 09:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:11:23] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 09:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:12:05
    [end_date_ymd] => 2025-02-26 09:12:05
    [RateCDR] => 1
)
  
[2025-02-26 09:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:12:05' and `end` < '2025-02-26 09:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:12:17] Production.INFO: count ==957  
[2025-02-26 09:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:12:05 - End Time 2025-02-26 09:12:05  
[2025-02-26 09:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560773', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560773', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560773', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560773', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:12:18] Production.INFO: ProcessCDR(1,14560773,1,1,2)  
[2025-02-26 09:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560773', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560773', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:12:21] Production.INFO: ==17979== Releasing lock...  
[2025-02-26 09:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:12:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 09:13:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:13:06
    [end_date_ymd] => 2025-02-26 09:13:06
    [RateCDR] => 1
)
  
[2025-02-26 09:13:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:13:06' and `end` < '2025-02-26 09:13:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:13:18] Production.INFO: count ==973  
[2025-02-26 09:13:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:13:06 - End Time 2025-02-26 09:13:06  
[2025-02-26 09:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560778', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560778', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560778', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560778', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:13:18] Production.INFO: ProcessCDR(1,14560778,1,1,2)  
[2025-02-26 09:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:13:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:13:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:13:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560778', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560778', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:13:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:13:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:13:23] Production.INFO: ==18085== Releasing lock...  
[2025-02-26 09:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:13:23] Production.INFO: 36.25 MB  #Memory Used#   
[2025-02-26 09:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:14:05
    [end_date_ymd] => 2025-02-26 09:14:05
    [RateCDR] => 1
)
  
[2025-02-26 09:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:14:05' and `end` < '2025-02-26 09:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:14:17] Production.INFO: count ==994  
[2025-02-26 09:14:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:14:05 - End Time 2025-02-26 09:14:05  
[2025-02-26 09:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560783', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560783', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:14:17] Production.INFO: ProcessCDR(1,14560783,1,1,2)  
[2025-02-26 09:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:14:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:14:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:14:22] Production.INFO: ==18195== Releasing lock...  
[2025-02-26 09:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:14:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 09:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:15:05
    [end_date_ymd] => 2025-02-26 09:15:05
    [RateCDR] => 1
)
  
[2025-02-26 09:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:15:05' and `end` < '2025-02-26 09:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:15:17] Production.INFO: count ==998  
[2025-02-26 09:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:15:05 - End Time 2025-02-26 09:15:05  
[2025-02-26 09:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560788', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560788', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:15:18] Production.INFO: ProcessCDR(1,14560788,1,1,2)  
[2025-02-26 09:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:15:23] Production.INFO: ==18306== Releasing lock...  
[2025-02-26 09:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:15:23] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 09:16:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:16:04
    [end_date_ymd] => 2025-02-26 09:16:04
    [RateCDR] => 1
)
  
[2025-02-26 09:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:16:04' and `end` < '2025-02-26 09:16:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:16:17] Production.INFO: count ==1015  
[2025-02-26 09:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:16:04 - End Time 2025-02-26 09:16:04  
[2025-02-26 09:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560793', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560793', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:16:17] Production.INFO: ProcessCDR(1,14560793,1,1,2)  
[2025-02-26 09:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:16:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:16:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:16:22] Production.INFO: ==18451== Releasing lock...  
[2025-02-26 09:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:16:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-02-26 09:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:17:05
    [end_date_ymd] => 2025-02-26 09:17:05
    [RateCDR] => 1
)
  
[2025-02-26 09:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:17:05' and `end` < '2025-02-26 09:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:17:17] Production.INFO: count ==1018  
[2025-02-26 09:17:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:17:05 - End Time 2025-02-26 09:17:05  
[2025-02-26 09:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560798', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560798', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560798', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560798', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:17:18] Production.INFO: ProcessCDR(1,14560798,1,1,2)  
[2025-02-26 09:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:17:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560798', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560798', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:17:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:17:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:17:22] Production.INFO: ==18561== Releasing lock...  
[2025-02-26 09:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:17:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 09:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:18:05
    [end_date_ymd] => 2025-02-26 09:18:05
    [RateCDR] => 1
)
  
[2025-02-26 09:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:18:05' and `end` < '2025-02-26 09:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:18:17] Production.INFO: count ==1029  
[2025-02-26 09:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 06:18:05 - End Time 2025-02-26 09:18:05  
[2025-02-26 09:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560803', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560803', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560803', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560803', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:18:17] Production.INFO: ProcessCDR(1,14560803,1,1,2)  
[2025-02-26 09:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560803', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560803', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:18:22] Production.INFO: ==18671== Releasing lock...  
[2025-02-26 09:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:18:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 09:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:19:05
    [end_date_ymd] => 2025-02-26 09:19:05
    [RateCDR] => 1
)
  
[2025-02-26 09:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:19:05' and `end` < '2025-02-26 09:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:19:17] Production.INFO: count ==1034  
[2025-02-26 09:19:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:19:05 - End Time 2025-02-26 09:19:05  
[2025-02-26 09:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560808', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560808', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:19:18] Production.INFO: ProcessCDR(1,14560808,1,1,2)  
[2025-02-26 09:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:19:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:19:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:19:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:19:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:19:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:19:22] Production.INFO: ==18784== Releasing lock...  
[2025-02-26 09:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:19:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 09:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:20:07
    [end_date_ymd] => 2025-02-26 09:20:07
    [RateCDR] => 1
)
  
[2025-02-26 09:20:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:20:07' and `end` < '2025-02-26 09:20:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:20:19] Production.INFO: count ==1053  
[2025-02-26 09:20:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:20:07 - End Time 2025-02-26 09:20:07  
[2025-02-26 09:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560814', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560814', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560814', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560814', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:20:19] Production.INFO: ProcessCDR(1,14560814,1,1,2)  
[2025-02-26 09:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:20:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:20:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560814', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560814', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:20:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:20:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:20:25] Production.INFO: ==18894== Releasing lock...  
[2025-02-26 09:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:20:25] Production.INFO: 36.5 MB  #Memory Used#   
[2025-02-26 09:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:21:05
    [end_date_ymd] => 2025-02-26 09:21:05
    [RateCDR] => 1
)
  
[2025-02-26 09:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:21:05' and `end` < '2025-02-26 09:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:21:18] Production.INFO: count ==1125  
[2025-02-26 09:21:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:21:05 - End Time 2025-02-26 09:21:05  
[2025-02-26 09:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560819', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560819', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560819', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560819', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:21:18] Production.INFO: ProcessCDR(1,14560819,1,1,2)  
[2025-02-26 09:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:21:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560819', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560819', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:21:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:21:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:21:23] Production.INFO: ==18999== Releasing lock...  
[2025-02-26 09:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:21:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 09:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:22:05
    [end_date_ymd] => 2025-02-26 09:22:05
    [RateCDR] => 1
)
  
[2025-02-26 09:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:22:05' and `end` < '2025-02-26 09:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:22:17] Production.INFO: count ==1128  
[2025-02-26 09:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:22:05 - End Time 2025-02-26 09:22:05  
[2025-02-26 09:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560824', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560824', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560824', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560824', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:22:18] Production.INFO: ProcessCDR(1,14560824,1,1,2)  
[2025-02-26 09:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560824', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560824', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:22:23] Production.INFO: ==19119== Releasing lock...  
[2025-02-26 09:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:22:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 09:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:23:05
    [end_date_ymd] => 2025-02-26 09:23:05
    [RateCDR] => 1
)
  
[2025-02-26 09:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:23:05' and `end` < '2025-02-26 09:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:23:18] Production.INFO: count ==1141  
[2025-02-26 09:23:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:23:05 - End Time 2025-02-26 09:23:05  
[2025-02-26 09:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560829', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560829', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560829', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560829', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:23:18] Production.INFO: ProcessCDR(1,14560829,1,1,2)  
[2025-02-26 09:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:23:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:23:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:23:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560829', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560829', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:23:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:23:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:23:23] Production.INFO: ==19245== Releasing lock...  
[2025-02-26 09:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:23:23] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 09:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:24:06
    [end_date_ymd] => 2025-02-26 09:24:06
    [RateCDR] => 1
)
  
[2025-02-26 09:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:24:06' and `end` < '2025-02-26 09:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:24:18] Production.INFO: count ==1150  
[2025-02-26 09:24:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:24:06 - End Time 2025-02-26 09:24:06  
[2025-02-26 09:24:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560834', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560834', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:24:19] Production.INFO: ProcessCDR(1,14560834,1,1,2)  
[2025-02-26 09:24:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:24:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:24:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:24:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:24:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:24:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:24:24] Production.INFO: ==19365== Releasing lock...  
[2025-02-26 09:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:24:24] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 09:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:25:05
    [end_date_ymd] => 2025-02-26 09:25:05
    [RateCDR] => 1
)
  
[2025-02-26 09:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:25:05' and `end` < '2025-02-26 09:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:25:18] Production.INFO: count ==1145  
[2025-02-26 09:25:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:25:05 - End Time 2025-02-26 09:25:05  
[2025-02-26 09:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560839', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560839', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:25:18] Production.INFO: ProcessCDR(1,14560839,1,1,2)  
[2025-02-26 09:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:25:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:25:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:25:23] Production.INFO: ==19489== Releasing lock...  
[2025-02-26 09:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:25:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 09:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:26:05
    [end_date_ymd] => 2025-02-26 09:26:05
    [RateCDR] => 1
)
  
[2025-02-26 09:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:26:05' and `end` < '2025-02-26 09:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:26:17] Production.INFO: count ==1163  
[2025-02-26 09:26:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:26:05 - End Time 2025-02-26 09:26:05  
[2025-02-26 09:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560844', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560844', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560844', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560844', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:26:18] Production.INFO: ProcessCDR(1,14560844,1,1,2)  
[2025-02-26 09:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:26:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560844', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560844', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:26:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:26:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:26:23] Production.INFO: ==19603== Releasing lock...  
[2025-02-26 09:26:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:26:23] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 09:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:27:05
    [end_date_ymd] => 2025-02-26 09:27:05
    [RateCDR] => 1
)
  
[2025-02-26 09:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:27:05' and `end` < '2025-02-26 09:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:27:18] Production.INFO: count ==1197  
[2025-02-26 09:27:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:27:05 - End Time 2025-02-26 09:27:05  
[2025-02-26 09:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560849', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560849', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560849', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560849', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:27:18] Production.INFO: ProcessCDR(1,14560849,1,1,2)  
[2025-02-26 09:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:27:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:27:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:27:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560849', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560849', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:27:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:27:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:27:23] Production.INFO: ==19724== Releasing lock...  
[2025-02-26 09:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:27:23] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 09:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:28:05
    [end_date_ymd] => 2025-02-26 09:28:05
    [RateCDR] => 1
)
  
[2025-02-26 09:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:28:05' and `end` < '2025-02-26 09:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:28:17] Production.INFO: count ==1212  
[2025-02-26 09:28:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:28:05 - End Time 2025-02-26 09:28:05  
[2025-02-26 09:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560854', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560854', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:28:18] Production.INFO: ProcessCDR(1,14560854,1,1,2)  
[2025-02-26 09:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:28:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:28:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:28:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:28:23] Production.INFO: ==19843== Releasing lock...  
[2025-02-26 09:28:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:28:23] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 09:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:29:05
    [end_date_ymd] => 2025-02-26 09:29:05
    [RateCDR] => 1
)
  
[2025-02-26 09:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:29:05' and `end` < '2025-02-26 09:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:29:17] Production.INFO: count ==1237  
[2025-02-26 09:29:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:29:05 - End Time 2025-02-26 09:29:05  
[2025-02-26 09:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560859', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560859', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:29:18] Production.INFO: ProcessCDR(1,14560859,1,1,2)  
[2025-02-26 09:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:29:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:29:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:29:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:29:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:29:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:29:23] Production.INFO: ==19962== Releasing lock...  
[2025-02-26 09:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:29:23] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 09:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:30:06
    [end_date_ymd] => 2025-02-26 09:30:06
    [RateCDR] => 1
)
  
[2025-02-26 09:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:30:06' and `end` < '2025-02-26 09:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:30:18] Production.INFO: count ==1250  
[2025-02-26 09:30:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:30:06 - End Time 2025-02-26 09:30:06  
[2025-02-26 09:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560865', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560865', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560865', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560865', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:30:19] Production.INFO: ProcessCDR(1,14560865,1,1,2)  
[2025-02-26 09:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:30:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:30:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:30:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560865', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560865', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:30:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:30:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:30:24] Production.INFO: ==20089== Releasing lock...  
[2025-02-26 09:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:30:24] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 09:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:31:06
    [end_date_ymd] => 2025-02-26 09:31:06
    [RateCDR] => 1
)
  
[2025-02-26 09:31:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:31:06' and `end` < '2025-02-26 09:31:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:31:18] Production.INFO: count ==1330  
[2025-02-26 09:31:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:31:06 - End Time 2025-02-26 09:31:06  
[2025-02-26 09:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560870', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560870', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560870', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560870', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:31:18] Production.INFO: ProcessCDR(1,14560870,1,1,2)  
[2025-02-26 09:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:31:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:31:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:31:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560870', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560870', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:31:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:31:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:31:23] Production.INFO: ==20254== Releasing lock...  
[2025-02-26 09:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:31:23] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 09:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:32:05
    [end_date_ymd] => 2025-02-26 09:32:05
    [RateCDR] => 1
)
  
[2025-02-26 09:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:32:05' and `end` < '2025-02-26 09:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:32:17] Production.INFO: count ==1340  
[2025-02-26 09:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:32:05 - End Time 2025-02-26 09:32:05  
[2025-02-26 09:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560875', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560875', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560875', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560875', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:32:18] Production.INFO: ProcessCDR(1,14560875,1,1,2)  
[2025-02-26 09:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:32:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:32:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560875', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560875', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:32:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:32:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:32:24] Production.INFO: ==20368== Releasing lock...  
[2025-02-26 09:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:32:24] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 09:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:33:06
    [end_date_ymd] => 2025-02-26 09:33:06
    [RateCDR] => 1
)
  
[2025-02-26 09:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:33:06' and `end` < '2025-02-26 09:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:33:18] Production.INFO: count ==1341  
[2025-02-26 09:33:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:33:06 - End Time 2025-02-26 09:33:06  
[2025-02-26 09:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560880', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560880', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560880', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560880', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:33:19] Production.INFO: ProcessCDR(1,14560880,1,1,2)  
[2025-02-26 09:33:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560880', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560880', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:33:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:33:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:33:24] Production.INFO: ==20497== Releasing lock...  
[2025-02-26 09:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:33:24] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 09:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:34:06
    [end_date_ymd] => 2025-02-26 09:34:06
    [RateCDR] => 1
)
  
[2025-02-26 09:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:34:06' and `end` < '2025-02-26 09:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:34:18] Production.INFO: count ==1348  
[2025-02-26 09:34:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:34:06 - End Time 2025-02-26 09:34:06  
[2025-02-26 09:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560885', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560885', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:34:19] Production.INFO: ProcessCDR(1,14560885,1,1,2)  
[2025-02-26 09:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:34:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:34:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:34:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:34:24] Production.INFO: ==20622== Releasing lock...  
[2025-02-26 09:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:34:24] Production.INFO: 38.25 MB  #Memory Used#   
[2025-02-26 09:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:35:06
    [end_date_ymd] => 2025-02-26 09:35:06
    [RateCDR] => 1
)
  
[2025-02-26 09:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:35:06' and `end` < '2025-02-26 09:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:35:18] Production.INFO: count ==1374  
[2025-02-26 09:35:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:35:06 - End Time 2025-02-26 09:35:06  
[2025-02-26 09:35:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560890', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560890', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:35:19] Production.INFO: ProcessCDR(1,14560890,1,1,2)  
[2025-02-26 09:35:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:35:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:35:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:35:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:35:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:35:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:35:23] Production.INFO: ==20735== Releasing lock...  
[2025-02-26 09:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:35:23] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 09:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:36:05
    [end_date_ymd] => 2025-02-26 09:36:05
    [RateCDR] => 1
)
  
[2025-02-26 09:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:36:05' and `end` < '2025-02-26 09:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:36:18] Production.INFO: count ==1381  
[2025-02-26 09:36:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:36:05 - End Time 2025-02-26 09:36:05  
[2025-02-26 09:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560895', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560895', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560895', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560895', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:36:18] Production.INFO: ProcessCDR(1,14560895,1,1,2)  
[2025-02-26 09:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:36:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:36:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560895', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560895', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:36:23] Production.INFO: ==20850== Releasing lock...  
[2025-02-26 09:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:36:23] Production.INFO: 38.5 MB  #Memory Used#   
[2025-02-26 09:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:37:05
    [end_date_ymd] => 2025-02-26 09:37:05
    [RateCDR] => 1
)
  
[2025-02-26 09:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:37:05' and `end` < '2025-02-26 09:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:37:17] Production.INFO: count ==1399  
[2025-02-26 09:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:37:05 - End Time 2025-02-26 09:37:05  
[2025-02-26 09:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560900', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560900', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560900', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560900', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:37:18] Production.INFO: ProcessCDR(1,14560900,1,1,2)  
[2025-02-26 09:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:37:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:37:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:37:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:37:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560900', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:37:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560900', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:37:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:37:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:37:23] Production.INFO: ==20966== Releasing lock...  
[2025-02-26 09:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:37:23] Production.INFO: 38.5 MB  #Memory Used#   
[2025-02-26 09:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:38:05
    [end_date_ymd] => 2025-02-26 09:38:05
    [RateCDR] => 1
)
  
[2025-02-26 09:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:38:05' and `end` < '2025-02-26 09:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:38:17] Production.INFO: count ==1424  
[2025-02-26 09:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:38:05 - End Time 2025-02-26 09:38:05  
[2025-02-26 09:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560905', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560905', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:38:18] Production.INFO: ProcessCDR(1,14560905,1,1,2)  
[2025-02-26 09:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:38:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:38:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:38:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:38:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:38:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:38:23] Production.INFO: ==21088== Releasing lock...  
[2025-02-26 09:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:38:23] Production.INFO: 38.75 MB  #Memory Used#   
[2025-02-26 09:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:39:05
    [end_date_ymd] => 2025-02-26 09:39:05
    [RateCDR] => 1
)
  
[2025-02-26 09:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:39:05' and `end` < '2025-02-26 09:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:39:18] Production.INFO: count ==1441  
[2025-02-26 09:39:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:39:05 - End Time 2025-02-26 09:39:05  
[2025-02-26 09:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560910', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560910', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:39:18] Production.INFO: ProcessCDR(1,14560910,1,1,2)  
[2025-02-26 09:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:39:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:39:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:39:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:39:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:39:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:39:23] Production.INFO: ==21189== Releasing lock...  
[2025-02-26 09:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:39:23] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 09:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:40:05
    [end_date_ymd] => 2025-02-26 09:40:05
    [RateCDR] => 1
)
  
[2025-02-26 09:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:40:05' and `end` < '2025-02-26 09:40:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:40:18] Production.INFO: count ==1477  
[2025-02-26 09:40:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:40:05 - End Time 2025-02-26 09:40:05  
[2025-02-26 09:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560916', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560916', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560916', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560916', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:40:19] Production.INFO: ProcessCDR(1,14560916,1,1,2)  
[2025-02-26 09:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560916', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560916', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:40:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:40:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:40:24] Production.INFO: ==21274== Releasing lock...  
[2025-02-26 09:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:40:24] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 09:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:41:05
    [end_date_ymd] => 2025-02-26 09:41:05
    [RateCDR] => 1
)
  
[2025-02-26 09:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:41:05' and `end` < '2025-02-26 09:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:41:17] Production.INFO: count ==1580  
[2025-02-26 09:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:41:05 - End Time 2025-02-26 09:41:05  
[2025-02-26 09:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560921', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560921', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560921', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560921', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:41:18] Production.INFO: ProcessCDR(1,14560921,1,1,2)  
[2025-02-26 09:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:41:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:41:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:41:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560921', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560921', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:41:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:41:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:41:24] Production.INFO: ==21365== Releasing lock...  
[2025-02-26 09:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:41:24] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 09:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:42:05
    [end_date_ymd] => 2025-02-26 09:42:05
    [RateCDR] => 1
)
  
[2025-02-26 09:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:42:05' and `end` < '2025-02-26 09:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:42:17] Production.INFO: count ==1626  
[2025-02-26 09:42:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:42:05 - End Time 2025-02-26 09:42:05  
[2025-02-26 09:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560926', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560926', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560926', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560926', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:42:18] Production.INFO: ProcessCDR(1,14560926,1,1,2)  
[2025-02-26 09:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:42:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:42:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:42:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560926', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560926', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:42:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:42:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:42:24] Production.INFO: ==21449== Releasing lock...  
[2025-02-26 09:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:42:24] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 09:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:43:05
    [end_date_ymd] => 2025-02-26 09:43:05
    [RateCDR] => 1
)
  
[2025-02-26 09:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:43:05' and `end` < '2025-02-26 09:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:43:18] Production.INFO: count ==1634  
[2025-02-26 09:43:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:43:05 - End Time 2025-02-26 09:43:05  
[2025-02-26 09:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560931', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560931', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560931', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560931', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:43:18] Production.INFO: ProcessCDR(1,14560931,1,1,2)  
[2025-02-26 09:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:43:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:43:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:43:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560931', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560931', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:43:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:43:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:43:23] Production.INFO: ==21535== Releasing lock...  
[2025-02-26 09:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:43:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 09:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:44:05
    [end_date_ymd] => 2025-02-26 09:44:05
    [RateCDR] => 1
)
  
[2025-02-26 09:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:44:05' and `end` < '2025-02-26 09:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:44:18] Production.INFO: count ==1648  
[2025-02-26 09:44:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:44:05 - End Time 2025-02-26 09:44:05  
[2025-02-26 09:44:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560936', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560936', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:44:19] Production.INFO: ProcessCDR(1,14560936,1,1,2)  
[2025-02-26 09:44:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:44:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:44:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:44:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:44:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:44:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:44:24] Production.INFO: ==21618== Releasing lock...  
[2025-02-26 09:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:44:24] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 09:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:45:06
    [end_date_ymd] => 2025-02-26 09:45:06
    [RateCDR] => 1
)
  
[2025-02-26 09:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:45:06' and `end` < '2025-02-26 09:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:45:19] Production.INFO: count ==1656  
[2025-02-26 09:45:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:45:06 - End Time 2025-02-26 09:45:06  
[2025-02-26 09:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560941', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560941', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:45:19] Production.INFO: ProcessCDR(1,14560941,1,1,2)  
[2025-02-26 09:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:45:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:45:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:45:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:45:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:45:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:45:24] Production.INFO: ==21701== Releasing lock...  
[2025-02-26 09:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:45:24] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 09:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:46:06
    [end_date_ymd] => 2025-02-26 09:46:06
    [RateCDR] => 1
)
  
[2025-02-26 09:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:46:06' and `end` < '2025-02-26 09:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:46:18] Production.INFO: count ==1685  
[2025-02-26 09:46:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:46:06 - End Time 2025-02-26 09:46:06  
[2025-02-26 09:46:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560946', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560946', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560946', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560946', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:46:19] Production.INFO: ProcessCDR(1,14560946,1,1,2)  
[2025-02-26 09:46:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:46:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:46:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:46:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560946', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560946', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:46:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:46:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:46:24] Production.INFO: ==21783== Releasing lock...  
[2025-02-26 09:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:46:24] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 09:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:47:05
    [end_date_ymd] => 2025-02-26 09:47:05
    [RateCDR] => 1
)
  
[2025-02-26 09:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:47:05' and `end` < '2025-02-26 09:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:47:17] Production.INFO: count ==1697  
[2025-02-26 09:47:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:47:05 - End Time 2025-02-26 09:47:05  
[2025-02-26 09:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560951', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560951', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560951', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560951', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:47:18] Production.INFO: ProcessCDR(1,14560951,1,1,2)  
[2025-02-26 09:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:47:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:47:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:47:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560951', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560951', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:47:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:47:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:47:23] Production.INFO: ==21902== Releasing lock...  
[2025-02-26 09:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:47:23] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 09:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:48:06
    [end_date_ymd] => 2025-02-26 09:48:06
    [RateCDR] => 1
)
  
[2025-02-26 09:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:48:06' and `end` < '2025-02-26 09:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:48:18] Production.INFO: count ==1714  
[2025-02-26 09:48:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:48:06 - End Time 2025-02-26 09:48:06  
[2025-02-26 09:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560956', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560956', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:48:19] Production.INFO: ProcessCDR(1,14560956,1,1,2)  
[2025-02-26 09:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:48:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:48:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:48:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:48:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:48:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:48:24] Production.INFO: ==21982== Releasing lock...  
[2025-02-26 09:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:48:24] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 09:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:49:05
    [end_date_ymd] => 2025-02-26 09:49:05
    [RateCDR] => 1
)
  
[2025-02-26 09:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:49:05' and `end` < '2025-02-26 09:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:49:18] Production.INFO: count ==1733  
[2025-02-26 09:49:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:49:05 - End Time 2025-02-26 09:49:05  
[2025-02-26 09:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560961', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560961', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:49:18] Production.INFO: ProcessCDR(1,14560961,1,1,2)  
[2025-02-26 09:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:49:24] Production.INFO: ==22067== Releasing lock...  
[2025-02-26 09:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:49:24] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 09:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:50:06
    [end_date_ymd] => 2025-02-26 09:50:06
    [RateCDR] => 1
)
  
[2025-02-26 09:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:50:06' and `end` < '2025-02-26 09:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:50:19] Production.INFO: count ==1766  
[2025-02-26 09:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:50:06 - End Time 2025-02-26 09:50:06  
[2025-02-26 09:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560967', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560967', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560967', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560967', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:50:19] Production.INFO: ProcessCDR(1,14560967,1,1,2)  
[2025-02-26 09:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:50:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:50:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:50:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560967', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560967', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:50:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:50:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:50:25] Production.INFO: ==22147== Releasing lock...  
[2025-02-26 09:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:50:25] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 09:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:51:05
    [end_date_ymd] => 2025-02-26 09:51:05
    [RateCDR] => 1
)
  
[2025-02-26 09:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:51:05' and `end` < '2025-02-26 09:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:51:17] Production.INFO: count ==1845  
[2025-02-26 09:51:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:51:05 - End Time 2025-02-26 09:51:05  
[2025-02-26 09:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560972', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560972', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560972', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560972', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:51:18] Production.INFO: ProcessCDR(1,14560972,1,1,2)  
[2025-02-26 09:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:51:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:51:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:51:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560972', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560972', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:51:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:51:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:51:23] Production.INFO: ==22230== Releasing lock...  
[2025-02-26 09:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:51:23] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 09:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:52:06
    [end_date_ymd] => 2025-02-26 09:52:06
    [RateCDR] => 1
)
  
[2025-02-26 09:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:52:06' and `end` < '2025-02-26 09:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:52:18] Production.INFO: count ==1860  
[2025-02-26 09:52:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:52:06 - End Time 2025-02-26 09:52:06  
[2025-02-26 09:52:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560977', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560977', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560977', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560977', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:52:19] Production.INFO: ProcessCDR(1,14560977,1,1,2)  
[2025-02-26 09:52:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:52:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560977', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560977', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:52:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:52:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:52:24] Production.INFO: ==22323== Releasing lock...  
[2025-02-26 09:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:52:24] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 09:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:53:05
    [end_date_ymd] => 2025-02-26 09:53:05
    [RateCDR] => 1
)
  
[2025-02-26 09:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:53:05' and `end` < '2025-02-26 09:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:53:17] Production.INFO: count ==1878  
[2025-02-26 09:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:53:05 - End Time 2025-02-26 09:53:05  
[2025-02-26 09:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560982', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560982', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560982', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560982', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:53:18] Production.INFO: ProcessCDR(1,14560982,1,1,2)  
[2025-02-26 09:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:53:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:53:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:53:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560982', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560982', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:53:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:53:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:53:23] Production.INFO: ==22402== Releasing lock...  
[2025-02-26 09:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:53:23] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 09:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:54:05
    [end_date_ymd] => 2025-02-26 09:54:05
    [RateCDR] => 1
)
  
[2025-02-26 09:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:54:05' and `end` < '2025-02-26 09:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:54:18] Production.INFO: count ==1899  
[2025-02-26 09:54:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:54:05 - End Time 2025-02-26 09:54:05  
[2025-02-26 09:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560987', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560987', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:54:19] Production.INFO: ProcessCDR(1,14560987,1,1,2)  
[2025-02-26 09:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:54:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:54:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:54:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:54:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:54:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:54:24] Production.INFO: ==22492== Releasing lock...  
[2025-02-26 09:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:54:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 09:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:55:05
    [end_date_ymd] => 2025-02-26 09:55:05
    [RateCDR] => 1
)
  
[2025-02-26 09:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:55:05' and `end` < '2025-02-26 09:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:55:18] Production.INFO: count ==1924  
[2025-02-26 09:55:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:55:05 - End Time 2025-02-26 09:55:05  
[2025-02-26 09:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560992', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560992', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:55:19] Production.INFO: ProcessCDR(1,14560992,1,1,2)  
[2025-02-26 09:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:55:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:55:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:55:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:55:24] Production.INFO: ==22570== Releasing lock...  
[2025-02-26 09:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:55:24] Production.INFO: 42.75 MB  #Memory Used#   
[2025-02-26 09:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:56:06
    [end_date_ymd] => 2025-02-26 09:56:06
    [RateCDR] => 1
)
  
[2025-02-26 09:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:56:06' and `end` < '2025-02-26 09:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:56:19] Production.INFO: count ==1942  
[2025-02-26 09:56:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:56:06 - End Time 2025-02-26 09:56:06  
[2025-02-26 09:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560997', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14560997', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560997', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14560997', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:56:19] Production.INFO: ProcessCDR(1,14560997,1,1,2)  
[2025-02-26 09:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14560997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14560997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14560997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14560997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560997', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14560997', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:56:25] Production.INFO: ==22647== Releasing lock...  
[2025-02-26 09:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:56:25] Production.INFO: 42.75 MB  #Memory Used#   
[2025-02-26 09:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:57:05
    [end_date_ymd] => 2025-02-26 09:57:05
    [RateCDR] => 1
)
  
[2025-02-26 09:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:57:05' and `end` < '2025-02-26 09:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:57:18] Production.INFO: count ==1957  
[2025-02-26 09:57:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:57:05 - End Time 2025-02-26 09:57:05  
[2025-02-26 09:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561002', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561002', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561002', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561002', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:57:19] Production.INFO: ProcessCDR(1,14561002,1,1,2)  
[2025-02-26 09:57:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:57:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:57:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561002', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561002', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:57:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:57:26] Production.INFO: ==22728== Releasing lock...  
[2025-02-26 09:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:57:26] Production.INFO: 42.75 MB  #Memory Used#   
[2025-02-26 09:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:58:05
    [end_date_ymd] => 2025-02-26 09:58:05
    [RateCDR] => 1
)
  
[2025-02-26 09:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:58:05' and `end` < '2025-02-26 09:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:58:18] Production.INFO: count ==1988  
[2025-02-26 09:58:19] Production.ERROR: pbx CDR StartTime 2025-02-26 06:58:05 - End Time 2025-02-26 09:58:05  
[2025-02-26 09:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561007', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561007', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:58:19] Production.INFO: ProcessCDR(1,14561007,1,1,2)  
[2025-02-26 09:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:58:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:58:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:58:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:58:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:58:24] Production.INFO: ==22806== Releasing lock...  
[2025-02-26 09:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:58:24] Production.INFO: 43 MB  #Memory Used#   
[2025-02-26 09:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 06:59:05
    [end_date_ymd] => 2025-02-26 09:59:05
    [RateCDR] => 1
)
  
[2025-02-26 09:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 06:59:05' and `end` < '2025-02-26 09:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 09:59:17] Production.INFO: count ==2014  
[2025-02-26 09:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 06:59:05 - End Time 2025-02-26 09:59:05  
[2025-02-26 09:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 09:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561012', 'tblTempVendorCDR_20' ) start  
[2025-02-26 09:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561012', 'tblTempVendorCDR_20' ) end  
[2025-02-26 09:59:18] Production.INFO: ProcessCDR(1,14561012,1,1,2)  
[2025-02-26 09:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 09:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:59:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 09:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 09:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 09:59:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 09:59:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 09:59:23] Production.INFO: ==22881== Releasing lock...  
[2025-02-26 09:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 09:59:23] Production.INFO: 43.25 MB  #Memory Used#   
[2025-02-26 10:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:00:07
    [end_date_ymd] => 2025-02-26 10:00:07
    [RateCDR] => 1
)
  
[2025-02-26 10:00:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:00:07' and `end` < '2025-02-26 10:00:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:00:20] Production.INFO: count ==2035  
[2025-02-26 10:00:21] Production.ERROR: pbx CDR StartTime 2025-02-26 07:00:07 - End Time 2025-02-26 10:00:07  
[2025-02-26 10:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561018', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561018', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561018', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561018', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:00:21] Production.INFO: ProcessCDR(1,14561018,1,1,2)  
[2025-02-26 10:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:00:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:00:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:00:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561018', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561018', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:00:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:00:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:00:25] Production.INFO: ==22962== Releasing lock...  
[2025-02-26 10:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:00:25] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 10:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:01:06
    [end_date_ymd] => 2025-02-26 10:01:06
    [RateCDR] => 1
)
  
[2025-02-26 10:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:01:06' and `end` < '2025-02-26 10:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:01:19] Production.INFO: count ==2137  
[2025-02-26 10:01:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:01:06 - End Time 2025-02-26 10:01:06  
[2025-02-26 10:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561023', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561023', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561023', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561023', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:01:19] Production.INFO: ProcessCDR(1,14561023,1,1,2)  
[2025-02-26 10:01:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:01:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:01:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:01:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561023', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561023', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:01:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:01:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:01:25] Production.INFO: ==23061== Releasing lock...  
[2025-02-26 10:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:01:25] Production.INFO: 44.25 MB  #Memory Used#   
[2025-02-26 10:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:02:06
    [end_date_ymd] => 2025-02-26 10:02:06
    [RateCDR] => 1
)
  
[2025-02-26 10:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:02:06' and `end` < '2025-02-26 10:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:02:18] Production.INFO: count ==2158  
[2025-02-26 10:02:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:02:06 - End Time 2025-02-26 10:02:06  
[2025-02-26 10:02:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561028', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561028', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561028', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561028', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:02:19] Production.INFO: ProcessCDR(1,14561028,1,1,2)  
[2025-02-26 10:02:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:02:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:02:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:02:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561028', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561028', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:02:25] Production.INFO: ==23174== Releasing lock...  
[2025-02-26 10:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:02:25] Production.INFO: 44 MB  #Memory Used#   
[2025-02-26 10:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:03:06
    [end_date_ymd] => 2025-02-26 10:03:06
    [RateCDR] => 1
)
  
[2025-02-26 10:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:03:06' and `end` < '2025-02-26 10:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:03:18] Production.INFO: count ==2173  
[2025-02-26 10:03:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:03:06 - End Time 2025-02-26 10:03:06  
[2025-02-26 10:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561033', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561033', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561033', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561033', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:03:19] Production.INFO: ProcessCDR(1,14561033,1,1,2)  
[2025-02-26 10:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:03:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:03:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561033', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561033', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:03:25] Production.INFO: ==23252== Releasing lock...  
[2025-02-26 10:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:03:25] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 10:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:04:05
    [end_date_ymd] => 2025-02-26 10:04:05
    [RateCDR] => 1
)
  
[2025-02-26 10:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:04:05' and `end` < '2025-02-26 10:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:04:18] Production.INFO: count ==2194  
[2025-02-26 10:04:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:04:05 - End Time 2025-02-26 10:04:05  
[2025-02-26 10:04:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561038', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561038', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:04:19] Production.INFO: ProcessCDR(1,14561038,1,1,2)  
[2025-02-26 10:04:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:04:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:04:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:04:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:04:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:04:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:04:24] Production.INFO: ==23333== Releasing lock...  
[2025-02-26 10:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:04:24] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 10:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:05:06
    [end_date_ymd] => 2025-02-26 10:05:06
    [RateCDR] => 1
)
  
[2025-02-26 10:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:05:06' and `end` < '2025-02-26 10:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:05:18] Production.INFO: count ==2212  
[2025-02-26 10:05:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:05:06 - End Time 2025-02-26 10:05:06  
[2025-02-26 10:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561043', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561043', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:05:19] Production.INFO: ProcessCDR(1,14561043,1,1,2)  
[2025-02-26 10:05:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:05:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:05:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:05:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:05:24] Production.INFO: ==23409== Releasing lock...  
[2025-02-26 10:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:05:24] Production.INFO: 45 MB  #Memory Used#   
[2025-02-26 10:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:06:06
    [end_date_ymd] => 2025-02-26 10:06:06
    [RateCDR] => 1
)
  
[2025-02-26 10:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:06:06' and `end` < '2025-02-26 10:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:06:19] Production.INFO: count ==2237  
[2025-02-26 10:06:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:06:06 - End Time 2025-02-26 10:06:06  
[2025-02-26 10:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561048', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561048', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561048', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561048', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:06:20] Production.INFO: ProcessCDR(1,14561048,1,1,2)  
[2025-02-26 10:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561048', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561048', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:06:26] Production.INFO: ==23486== Releasing lock...  
[2025-02-26 10:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:06:26] Production.INFO: 45 MB  #Memory Used#   
[2025-02-26 10:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:07:05
    [end_date_ymd] => 2025-02-26 10:07:05
    [RateCDR] => 1
)
  
[2025-02-26 10:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:07:05' and `end` < '2025-02-26 10:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:07:18] Production.INFO: count ==2252  
[2025-02-26 10:07:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:07:05 - End Time 2025-02-26 10:07:05  
[2025-02-26 10:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561053', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561053', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561053', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561053', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:07:19] Production.INFO: ProcessCDR(1,14561053,1,1,2)  
[2025-02-26 10:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561053', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561053', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:07:24] Production.INFO: ==23558== Releasing lock...  
[2025-02-26 10:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:07:24] Production.INFO: 45 MB  #Memory Used#   
[2025-02-26 10:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:08:06
    [end_date_ymd] => 2025-02-26 10:08:06
    [RateCDR] => 1
)
  
[2025-02-26 10:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:08:06' and `end` < '2025-02-26 10:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:08:19] Production.INFO: count ==2271  
[2025-02-26 10:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:08:06 - End Time 2025-02-26 10:08:06  
[2025-02-26 10:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561058', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561058', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:08:20] Production.INFO: ProcessCDR(1,14561058,1,1,2)  
[2025-02-26 10:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:08:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:08:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:08:25] Production.INFO: ==23637== Releasing lock...  
[2025-02-26 10:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:08:25] Production.INFO: 45 MB  #Memory Used#   
[2025-02-26 10:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:09:05
    [end_date_ymd] => 2025-02-26 10:09:05
    [RateCDR] => 1
)
  
[2025-02-26 10:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:09:05' and `end` < '2025-02-26 10:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:09:18] Production.INFO: count ==2277  
[2025-02-26 10:09:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:09:05 - End Time 2025-02-26 10:09:05  
[2025-02-26 10:09:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561063', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561063', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:09:19] Production.INFO: ProcessCDR(1,14561063,1,1,2)  
[2025-02-26 10:09:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:09:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:09:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:09:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:09:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:09:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:09:24] Production.INFO: ==23710== Releasing lock...  
[2025-02-26 10:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:09:24] Production.INFO: 45.5 MB  #Memory Used#   
[2025-02-26 10:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:10:07
    [end_date_ymd] => 2025-02-26 10:10:07
    [RateCDR] => 1
)
  
[2025-02-26 10:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:10:07' and `end` < '2025-02-26 10:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:10:20] Production.INFO: count ==2293  
[2025-02-26 10:10:21] Production.ERROR: pbx CDR StartTime 2025-02-26 07:10:07 - End Time 2025-02-26 10:10:07  
[2025-02-26 10:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561069', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561069', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561069', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561069', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:10:21] Production.INFO: ProcessCDR(1,14561069,1,1,2)  
[2025-02-26 10:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:10:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561069', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561069', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:10:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:10:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:10:26] Production.INFO: ==23788== Releasing lock...  
[2025-02-26 10:10:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:10:26] Production.INFO: 45.25 MB  #Memory Used#   
[2025-02-26 10:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:11:06
    [end_date_ymd] => 2025-02-26 10:11:06
    [RateCDR] => 1
)
  
[2025-02-26 10:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:11:06' and `end` < '2025-02-26 10:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:11:18] Production.INFO: count ==2383  
[2025-02-26 10:11:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:11:06 - End Time 2025-02-26 10:11:06  
[2025-02-26 10:11:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561074', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561074', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561074', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561074', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:11:19] Production.INFO: ProcessCDR(1,14561074,1,1,2)  
[2025-02-26 10:11:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:11:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:11:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:11:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561074', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561074', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:11:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:11:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:11:25] Production.INFO: ==23864== Releasing lock...  
[2025-02-26 10:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:11:25] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 10:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:12:05
    [end_date_ymd] => 2025-02-26 10:12:05
    [RateCDR] => 1
)
  
[2025-02-26 10:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:12:05' and `end` < '2025-02-26 10:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:12:18] Production.INFO: count ==2400  
[2025-02-26 10:12:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:12:05 - End Time 2025-02-26 10:12:05  
[2025-02-26 10:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561079', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561079', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561079', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561079', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:12:19] Production.INFO: ProcessCDR(1,14561079,1,1,2)  
[2025-02-26 10:12:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:12:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:12:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:12:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561079', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561079', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:12:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:12:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:12:24] Production.INFO: ==23940== Releasing lock...  
[2025-02-26 10:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:12:24] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 10:13:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:13:06
    [end_date_ymd] => 2025-02-26 10:13:06
    [RateCDR] => 1
)
  
[2025-02-26 10:13:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:13:06' and `end` < '2025-02-26 10:13:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:13:18] Production.INFO: count ==2417  
[2025-02-26 10:13:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:13:06 - End Time 2025-02-26 10:13:06  
[2025-02-26 10:13:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561084', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561084', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561084', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561084', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:13:19] Production.INFO: ProcessCDR(1,14561084,1,1,2)  
[2025-02-26 10:13:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561084', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561084', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:13:25] Production.INFO: ==24016== Releasing lock...  
[2025-02-26 10:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:13:25] Production.INFO: 46.25 MB  #Memory Used#   
[2025-02-26 10:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:14:06
    [end_date_ymd] => 2025-02-26 10:14:06
    [RateCDR] => 1
)
  
[2025-02-26 10:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:14:06' and `end` < '2025-02-26 10:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:14:18] Production.INFO: count ==2449  
[2025-02-26 10:14:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:14:06 - End Time 2025-02-26 10:14:06  
[2025-02-26 10:14:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561089', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561089', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:14:19] Production.INFO: ProcessCDR(1,14561089,1,1,2)  
[2025-02-26 10:14:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:14:25] Production.INFO: ==24095== Releasing lock...  
[2025-02-26 10:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:14:25] Production.INFO: 46.5 MB  #Memory Used#   
[2025-02-26 10:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:15:06
    [end_date_ymd] => 2025-02-26 10:15:06
    [RateCDR] => 1
)
  
[2025-02-26 10:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:15:06' and `end` < '2025-02-26 10:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:15:18] Production.INFO: count ==2458  
[2025-02-26 10:15:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:15:06 - End Time 2025-02-26 10:15:06  
[2025-02-26 10:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561094', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561094', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:15:19] Production.INFO: ProcessCDR(1,14561094,1,1,2)  
[2025-02-26 10:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:15:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:15:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:15:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:15:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:15:25] Production.INFO: ==24166== Releasing lock...  
[2025-02-26 10:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:15:25] Production.INFO: 46.5 MB  #Memory Used#   
[2025-02-26 10:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:16:06
    [end_date_ymd] => 2025-02-26 10:16:06
    [RateCDR] => 1
)
  
[2025-02-26 10:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:16:06' and `end` < '2025-02-26 10:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:16:18] Production.INFO: count ==2480  
[2025-02-26 10:16:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:16:06 - End Time 2025-02-26 10:16:06  
[2025-02-26 10:16:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561099', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561099', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561099', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561099', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:16:19] Production.INFO: ProcessCDR(1,14561099,1,1,2)  
[2025-02-26 10:16:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:16:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:16:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:16:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561099', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561099', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:16:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:16:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:16:25] Production.INFO: ==24257== Releasing lock...  
[2025-02-26 10:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:16:25] Production.INFO: 46.75 MB  #Memory Used#   
[2025-02-26 10:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:17:06
    [end_date_ymd] => 2025-02-26 10:17:06
    [RateCDR] => 1
)
  
[2025-02-26 10:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:17:06' and `end` < '2025-02-26 10:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:17:18] Production.INFO: count ==2504  
[2025-02-26 10:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:17:06 - End Time 2025-02-26 10:17:06  
[2025-02-26 10:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561104', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561104', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561104', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561104', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:17:20] Production.INFO: ProcessCDR(1,14561104,1,1,2)  
[2025-02-26 10:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:17:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:17:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561104', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561104', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:17:25] Production.INFO: ==24399== Releasing lock...  
[2025-02-26 10:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:17:25] Production.INFO: 46.75 MB  #Memory Used#   
[2025-02-26 10:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:18:05
    [end_date_ymd] => 2025-02-26 10:18:05
    [RateCDR] => 1
)
  
[2025-02-26 10:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:18:05' and `end` < '2025-02-26 10:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:18:18] Production.INFO: count ==2516  
[2025-02-26 10:18:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:18:05 - End Time 2025-02-26 10:18:05  
[2025-02-26 10:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561109', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561109', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:18:19] Production.INFO: ProcessCDR(1,14561109,1,1,2)  
[2025-02-26 10:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:18:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:18:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:18:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:18:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:18:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:18:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:18:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:18:24] Production.INFO: ==24498== Releasing lock...  
[2025-02-26 10:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:18:24] Production.INFO: 47 MB  #Memory Used#   
[2025-02-26 10:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:19:06
    [end_date_ymd] => 2025-02-26 10:19:06
    [RateCDR] => 1
)
  
[2025-02-26 10:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:19:06' and `end` < '2025-02-26 10:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:19:19] Production.INFO: count ==2547  
[2025-02-26 10:19:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:19:06 - End Time 2025-02-26 10:19:06  
[2025-02-26 10:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561114', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561114', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:19:20] Production.INFO: ProcessCDR(1,14561114,1,1,2)  
[2025-02-26 10:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:19:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:19:26] Production.INFO: ==24600== Releasing lock...  
[2025-02-26 10:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:19:26] Production.INFO: 47.25 MB  #Memory Used#   
[2025-02-26 10:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:20:06
    [end_date_ymd] => 2025-02-26 10:20:06
    [RateCDR] => 1
)
  
[2025-02-26 10:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:20:06' and `end` < '2025-02-26 10:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:20:19] Production.INFO: count ==2575  
[2025-02-26 10:20:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:20:06 - End Time 2025-02-26 10:20:06  
[2025-02-26 10:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561120', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561120', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561120', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561120', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:20:20] Production.INFO: ProcessCDR(1,14561120,1,1,2)  
[2025-02-26 10:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:20:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:20:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561120', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561120', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:20:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:20:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:20:26] Production.INFO: ==24707== Releasing lock...  
[2025-02-26 10:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:20:26] Production.INFO: 47.5 MB  #Memory Used#   
[2025-02-26 10:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:21:05
    [end_date_ymd] => 2025-02-26 10:21:05
    [RateCDR] => 1
)
  
[2025-02-26 10:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:21:05' and `end` < '2025-02-26 10:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:21:18] Production.INFO: count ==2682  
[2025-02-26 10:21:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:21:05 - End Time 2025-02-26 10:21:05  
[2025-02-26 10:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561125', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561125', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561125', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561125', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:21:19] Production.INFO: ProcessCDR(1,14561125,1,1,2)  
[2025-02-26 10:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:21:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:21:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:21:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561125', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561125', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:21:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:21:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:21:24] Production.INFO: ==24808== Releasing lock...  
[2025-02-26 10:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:21:24] Production.INFO: 48.25 MB  #Memory Used#   
[2025-02-26 10:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:22:05
    [end_date_ymd] => 2025-02-26 10:22:05
    [RateCDR] => 1
)
  
[2025-02-26 10:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:22:05' and `end` < '2025-02-26 10:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:22:18] Production.INFO: count ==2721  
[2025-02-26 10:22:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:22:05 - End Time 2025-02-26 10:22:05  
[2025-02-26 10:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561130', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561130', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561130', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561130', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:22:19] Production.INFO: ProcessCDR(1,14561130,1,1,2)  
[2025-02-26 10:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:22:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:22:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:22:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561130', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561130', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:22:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:22:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:22:25] Production.INFO: ==24905== Releasing lock...  
[2025-02-26 10:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:22:25] Production.INFO: 48.5 MB  #Memory Used#   
[2025-02-26 10:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:23:05
    [end_date_ymd] => 2025-02-26 10:23:05
    [RateCDR] => 1
)
  
[2025-02-26 10:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:23:05' and `end` < '2025-02-26 10:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:23:18] Production.INFO: count ==2724  
[2025-02-26 10:23:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:23:05 - End Time 2025-02-26 10:23:05  
[2025-02-26 10:23:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561135', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561135', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561135', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561135', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:23:19] Production.INFO: ProcessCDR(1,14561135,1,1,2)  
[2025-02-26 10:23:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:23:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561135', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561135', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:23:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:23:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:23:24] Production.INFO: ==24977== Releasing lock...  
[2025-02-26 10:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:23:24] Production.INFO: 48.5 MB  #Memory Used#   
[2025-02-26 10:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:24:06
    [end_date_ymd] => 2025-02-26 10:24:06
    [RateCDR] => 1
)
  
[2025-02-26 10:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:24:06' and `end` < '2025-02-26 10:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:24:18] Production.INFO: count ==2741  
[2025-02-26 10:24:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:24:06 - End Time 2025-02-26 10:24:06  
[2025-02-26 10:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561140', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561140', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561140', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561140', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:24:20] Production.INFO: ProcessCDR(1,14561140,1,1,2)  
[2025-02-26 10:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561140', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561140', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:24:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:24:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:24:25] Production.INFO: ==25048== Releasing lock...  
[2025-02-26 10:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:24:25] Production.INFO: 48.75 MB  #Memory Used#   
[2025-02-26 10:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:25:05
    [end_date_ymd] => 2025-02-26 10:25:05
    [RateCDR] => 1
)
  
[2025-02-26 10:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:25:05' and `end` < '2025-02-26 10:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:25:18] Production.INFO: count ==2751  
[2025-02-26 10:25:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:25:05 - End Time 2025-02-26 10:25:05  
[2025-02-26 10:25:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561145', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561145', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:25:20] Production.INFO: ProcessCDR(1,14561145,1,1,2)  
[2025-02-26 10:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:25:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:25:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:25:25] Production.INFO: ==25124== Releasing lock...  
[2025-02-26 10:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:25:25] Production.INFO: 48.75 MB  #Memory Used#   
[2025-02-26 10:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:26:05
    [end_date_ymd] => 2025-02-26 10:26:05
    [RateCDR] => 1
)
  
[2025-02-26 10:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:26:05' and `end` < '2025-02-26 10:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:26:18] Production.INFO: count ==2773  
[2025-02-26 10:26:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:26:05 - End Time 2025-02-26 10:26:05  
[2025-02-26 10:26:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561150', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561150', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561150', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561150', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:26:19] Production.INFO: ProcessCDR(1,14561150,1,1,2)  
[2025-02-26 10:26:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:26:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:26:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561150', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561150', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:26:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:26:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:26:25] Production.INFO: ==25199== Releasing lock...  
[2025-02-26 10:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:26:25] Production.INFO: 49 MB  #Memory Used#   
[2025-02-26 10:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:27:05
    [end_date_ymd] => 2025-02-26 10:27:05
    [RateCDR] => 1
)
  
[2025-02-26 10:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:27:05' and `end` < '2025-02-26 10:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:27:18] Production.INFO: count ==2808  
[2025-02-26 10:27:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:27:05 - End Time 2025-02-26 10:27:05  
[2025-02-26 10:27:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561155', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561155', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561155', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561155', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:27:19] Production.INFO: ProcessCDR(1,14561155,1,1,2)  
[2025-02-26 10:27:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:27:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:27:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561155', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561155', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:27:25] Production.INFO: ==25272== Releasing lock...  
[2025-02-26 10:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:27:25] Production.INFO: 49.25 MB  #Memory Used#   
[2025-02-26 10:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:28:05
    [end_date_ymd] => 2025-02-26 10:28:05
    [RateCDR] => 1
)
  
[2025-02-26 10:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:28:05' and `end` < '2025-02-26 10:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:28:18] Production.INFO: count ==2845  
[2025-02-26 10:28:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:28:05 - End Time 2025-02-26 10:28:05  
[2025-02-26 10:28:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561160', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561160', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:28:20] Production.INFO: ProcessCDR(1,14561160,1,1,2)  
[2025-02-26 10:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:28:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:28:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:28:26] Production.INFO: ==25342== Releasing lock...  
[2025-02-26 10:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:28:26] Production.INFO: 49.5 MB  #Memory Used#   
[2025-02-26 10:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:29:06
    [end_date_ymd] => 2025-02-26 10:29:06
    [RateCDR] => 1
)
  
[2025-02-26 10:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:29:06' and `end` < '2025-02-26 10:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:29:19] Production.INFO: count ==2861  
[2025-02-26 10:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:29:06 - End Time 2025-02-26 10:29:06  
[2025-02-26 10:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561165', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561165', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:29:20] Production.INFO: ProcessCDR(1,14561165,1,1,2)  
[2025-02-26 10:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:29:26] Production.INFO: ==25415== Releasing lock...  
[2025-02-26 10:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:29:26] Production.INFO: 50.25 MB  #Memory Used#   
[2025-02-26 10:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:30:06
    [end_date_ymd] => 2025-02-26 10:30:06
    [RateCDR] => 1
)
  
[2025-02-26 10:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:30:06' and `end` < '2025-02-26 10:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:30:18] Production.INFO: count ==2875  
[2025-02-26 10:30:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:30:06 - End Time 2025-02-26 10:30:06  
[2025-02-26 10:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561170', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561170', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:30:20] Production.INFO: ProcessCDR(1,14561170,1,1,2)  
[2025-02-26 10:30:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:30:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:30:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:30:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:30:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:30:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:30:26] Production.INFO: ==25489== Releasing lock...  
[2025-02-26 10:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:30:26] Production.INFO: 50.25 MB  #Memory Used#   
[2025-02-26 10:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:31:06
    [end_date_ymd] => 2025-02-26 10:31:06
    [RateCDR] => 1
)
  
[2025-02-26 10:31:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:31:06' and `end` < '2025-02-26 10:31:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:31:18] Production.INFO: count ==2992  
[2025-02-26 10:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:31:06 - End Time 2025-02-26 10:31:06  
[2025-02-26 10:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561176', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561176', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561176', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561176', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:31:20] Production.INFO: ProcessCDR(1,14561176,1,1,2)  
[2025-02-26 10:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561176', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561176', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:31:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:31:26] Production.INFO: ==25564== Releasing lock...  
[2025-02-26 10:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:31:26] Production.INFO: 51.5 MB  #Memory Used#   
[2025-02-26 10:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:32:05
    [end_date_ymd] => 2025-02-26 10:32:05
    [RateCDR] => 1
)
  
[2025-02-26 10:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:32:05' and `end` < '2025-02-26 10:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:32:18] Production.INFO: count ==3015  
[2025-02-26 10:32:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:32:05 - End Time 2025-02-26 10:32:05  
[2025-02-26 10:32:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561181', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561181', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:32:20] Production.INFO: ProcessCDR(1,14561181,1,1,2)  
[2025-02-26 10:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:32:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:32:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561181', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561181', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:32:25] Production.INFO: ==25642== Releasing lock...  
[2025-02-26 10:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:32:25] Production.INFO: 51.5 MB  #Memory Used#   
[2025-02-26 10:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:33:05
    [end_date_ymd] => 2025-02-26 10:33:05
    [RateCDR] => 1
)
  
[2025-02-26 10:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:33:05' and `end` < '2025-02-26 10:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:33:18] Production.INFO: count ==3051  
[2025-02-26 10:33:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:33:05 - End Time 2025-02-26 10:33:05  
[2025-02-26 10:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561186', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561186', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:33:20] Production.INFO: ProcessCDR(1,14561186,1,1,2)  
[2025-02-26 10:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561186', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561186', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:33:25] Production.INFO: ==25756== Releasing lock...  
[2025-02-26 10:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:33:25] Production.INFO: 51.25 MB  #Memory Used#   
[2025-02-26 10:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:34:06
    [end_date_ymd] => 2025-02-26 10:34:06
    [RateCDR] => 1
)
  
[2025-02-26 10:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:34:06' and `end` < '2025-02-26 10:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:34:18] Production.INFO: count ==3064  
[2025-02-26 10:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:34:06 - End Time 2025-02-26 10:34:06  
[2025-02-26 10:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561191', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561191', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:34:20] Production.INFO: ProcessCDR(1,14561191,1,1,2)  
[2025-02-26 10:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561191', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561191', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:34:25] Production.INFO: ==25832== Releasing lock...  
[2025-02-26 10:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:34:25] Production.INFO: 51.25 MB  #Memory Used#   
[2025-02-26 10:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:35:06
    [end_date_ymd] => 2025-02-26 10:35:06
    [RateCDR] => 1
)
  
[2025-02-26 10:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:35:06' and `end` < '2025-02-26 10:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:35:18] Production.INFO: count ==3079  
[2025-02-26 10:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:35:06 - End Time 2025-02-26 10:35:06  
[2025-02-26 10:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561196', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561196', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:35:20] Production.INFO: ProcessCDR(1,14561196,1,1,2)  
[2025-02-26 10:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:35:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:35:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:35:25] Production.INFO: ==25906== Releasing lock...  
[2025-02-26 10:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:35:25] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 10:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:36:05
    [end_date_ymd] => 2025-02-26 10:36:05
    [RateCDR] => 1
)
  
[2025-02-26 10:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:36:05' and `end` < '2025-02-26 10:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:36:18] Production.INFO: count ==3102  
[2025-02-26 10:36:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:36:05 - End Time 2025-02-26 10:36:05  
[2025-02-26 10:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561201', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561201', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:36:20] Production.INFO: ProcessCDR(1,14561201,1,1,2)  
[2025-02-26 10:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:36:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:36:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:36:25] Production.INFO: ==25980== Releasing lock...  
[2025-02-26 10:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:36:25] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 10:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:37:05
    [end_date_ymd] => 2025-02-26 10:37:05
    [RateCDR] => 1
)
  
[2025-02-26 10:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:37:05' and `end` < '2025-02-26 10:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:37:18] Production.INFO: count ==3112  
[2025-02-26 10:37:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:37:05 - End Time 2025-02-26 10:37:05  
[2025-02-26 10:37:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561206', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561206', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:37:19] Production.INFO: ProcessCDR(1,14561206,1,1,2)  
[2025-02-26 10:37:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:37:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:37:25] Production.INFO: ==26055== Releasing lock...  
[2025-02-26 10:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:37:25] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 10:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:38:05
    [end_date_ymd] => 2025-02-26 10:38:05
    [RateCDR] => 1
)
  
[2025-02-26 10:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:38:05' and `end` < '2025-02-26 10:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:38:18] Production.INFO: count ==3127  
[2025-02-26 10:38:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:38:05 - End Time 2025-02-26 10:38:05  
[2025-02-26 10:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561211', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561211', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:38:19] Production.INFO: ProcessCDR(1,14561211,1,1,2)  
[2025-02-26 10:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:38:24] Production.INFO: ==26128== Releasing lock...  
[2025-02-26 10:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:38:24] Production.INFO: 52.25 MB  #Memory Used#   
[2025-02-26 10:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:39:06
    [end_date_ymd] => 2025-02-26 10:39:06
    [RateCDR] => 1
)
  
[2025-02-26 10:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:39:06' and `end` < '2025-02-26 10:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:39:18] Production.INFO: count ==3156  
[2025-02-26 10:39:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:39:06 - End Time 2025-02-26 10:39:06  
[2025-02-26 10:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561216', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561216', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:39:20] Production.INFO: ProcessCDR(1,14561216,1,1,2)  
[2025-02-26 10:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:39:26] Production.INFO: ==26206== Releasing lock...  
[2025-02-26 10:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:39:26] Production.INFO: 52.5 MB  #Memory Used#   
[2025-02-26 10:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:40:06
    [end_date_ymd] => 2025-02-26 10:40:06
    [RateCDR] => 1
)
  
[2025-02-26 10:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:40:06' and `end` < '2025-02-26 10:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:40:19] Production.INFO: count ==3170  
[2025-02-26 10:40:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:40:06 - End Time 2025-02-26 10:40:06  
[2025-02-26 10:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561222', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561222', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561222', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561222', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:40:20] Production.INFO: ProcessCDR(1,14561222,1,1,2)  
[2025-02-26 10:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561222', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561222', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:40:26] Production.INFO: ==26278== Releasing lock...  
[2025-02-26 10:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:40:26] Production.INFO: 52.25 MB  #Memory Used#   
[2025-02-26 10:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:41:05
    [end_date_ymd] => 2025-02-26 10:41:05
    [RateCDR] => 1
)
  
[2025-02-26 10:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:41:05' and `end` < '2025-02-26 10:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:41:18] Production.INFO: count ==3256  
[2025-02-26 10:41:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:41:05 - End Time 2025-02-26 10:41:05  
[2025-02-26 10:41:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561227', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561227', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561227', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561227', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:41:20] Production.INFO: ProcessCDR(1,14561227,1,1,2)  
[2025-02-26 10:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:41:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:41:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561227', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561227', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:41:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:41:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:41:25] Production.INFO: ==26354== Releasing lock...  
[2025-02-26 10:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:41:25] Production.INFO: 52.5 MB  #Memory Used#   
[2025-02-26 10:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:42:05
    [end_date_ymd] => 2025-02-26 10:42:05
    [RateCDR] => 1
)
  
[2025-02-26 10:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:42:05' and `end` < '2025-02-26 10:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:42:18] Production.INFO: count ==3258  
[2025-02-26 10:42:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:42:05 - End Time 2025-02-26 10:42:05  
[2025-02-26 10:42:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561232', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561232', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:42:19] Production.INFO: ProcessCDR(1,14561232,1,1,2)  
[2025-02-26 10:42:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:42:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:42:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:42:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561232', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561232', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:42:25] Production.INFO: ==26423== Releasing lock...  
[2025-02-26 10:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:42:25] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 10:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:43:05
    [end_date_ymd] => 2025-02-26 10:43:05
    [RateCDR] => 1
)
  
[2025-02-26 10:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:43:05' and `end` < '2025-02-26 10:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:43:18] Production.INFO: count ==3281  
[2025-02-26 10:43:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:43:05 - End Time 2025-02-26 10:43:05  
[2025-02-26 10:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561237', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561237', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:43:20] Production.INFO: ProcessCDR(1,14561237,1,1,2)  
[2025-02-26 10:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561237', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561237', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:43:25] Production.INFO: ==26496== Releasing lock...  
[2025-02-26 10:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:43:25] Production.INFO: 52.75 MB  #Memory Used#   
[2025-02-26 10:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:44:06
    [end_date_ymd] => 2025-02-26 10:44:06
    [RateCDR] => 1
)
  
[2025-02-26 10:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:44:06' and `end` < '2025-02-26 10:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:44:18] Production.INFO: count ==3299  
[2025-02-26 10:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:44:06 - End Time 2025-02-26 10:44:06  
[2025-02-26 10:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561242', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561242', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:44:20] Production.INFO: ProcessCDR(1,14561242,1,1,2)  
[2025-02-26 10:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:44:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:44:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:44:26] Production.INFO: ==26570== Releasing lock...  
[2025-02-26 10:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:44:26] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 10:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:45:05
    [end_date_ymd] => 2025-02-26 10:45:05
    [RateCDR] => 1
)
  
[2025-02-26 10:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:45:05' and `end` < '2025-02-26 10:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:45:18] Production.INFO: count ==3312  
[2025-02-26 10:45:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:45:05 - End Time 2025-02-26 10:45:05  
[2025-02-26 10:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561247', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561247', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:45:19] Production.INFO: ProcessCDR(1,14561247,1,1,2)  
[2025-02-26 10:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:45:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:45:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:45:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:45:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:45:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:45:25] Production.INFO: ==26643== Releasing lock...  
[2025-02-26 10:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:45:25] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 10:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:46:05
    [end_date_ymd] => 2025-02-26 10:46:05
    [RateCDR] => 1
)
  
[2025-02-26 10:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:46:05' and `end` < '2025-02-26 10:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:46:18] Production.INFO: count ==3327  
[2025-02-26 10:46:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:46:05 - End Time 2025-02-26 10:46:05  
[2025-02-26 10:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561252', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561252', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:46:20] Production.INFO: ProcessCDR(1,14561252,1,1,2)  
[2025-02-26 10:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:46:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:46:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:46:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:46:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:46:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:46:25] Production.INFO: ==26717== Releasing lock...  
[2025-02-26 10:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:46:25] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 10:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:47:06
    [end_date_ymd] => 2025-02-26 10:47:06
    [RateCDR] => 1
)
  
[2025-02-26 10:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:47:06' and `end` < '2025-02-26 10:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:47:18] Production.INFO: count ==3349  
[2025-02-26 10:47:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:47:06 - End Time 2025-02-26 10:47:06  
[2025-02-26 10:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561257', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561257', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:47:20] Production.INFO: ProcessCDR(1,14561257,1,1,2)  
[2025-02-26 10:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:47:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:47:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:47:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:47:25] Production.INFO: ==26789== Releasing lock...  
[2025-02-26 10:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:47:25] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 10:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:48:06
    [end_date_ymd] => 2025-02-26 10:48:06
    [RateCDR] => 1
)
  
[2025-02-26 10:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:48:06' and `end` < '2025-02-26 10:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:48:18] Production.INFO: count ==3375  
[2025-02-26 10:48:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:48:06 - End Time 2025-02-26 10:48:06  
[2025-02-26 10:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561262', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561262', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:48:20] Production.INFO: ProcessCDR(1,14561262,1,1,2)  
[2025-02-26 10:48:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:48:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:48:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:48:26] Production.INFO: ==26901== Releasing lock...  
[2025-02-26 10:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:48:26] Production.INFO: 54 MB  #Memory Used#   
[2025-02-26 10:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:49:06
    [end_date_ymd] => 2025-02-26 10:49:06
    [RateCDR] => 1
)
  
[2025-02-26 10:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:49:06' and `end` < '2025-02-26 10:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:49:19] Production.INFO: count ==3404  
[2025-02-26 10:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:49:06 - End Time 2025-02-26 10:49:06  
[2025-02-26 10:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561267', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561267', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:49:20] Production.INFO: ProcessCDR(1,14561267,1,1,2)  
[2025-02-26 10:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:49:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:49:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:49:24] Production.INFO: ==26981== Releasing lock...  
[2025-02-26 10:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:49:24] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 10:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:50:06
    [end_date_ymd] => 2025-02-26 10:50:06
    [RateCDR] => 1
)
  
[2025-02-26 10:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:50:06' and `end` < '2025-02-26 10:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:50:19] Production.INFO: count ==3431  
[2025-02-26 10:50:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:50:06 - End Time 2025-02-26 10:50:06  
[2025-02-26 10:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561273', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561273', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561273', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561273', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:50:20] Production.INFO: ProcessCDR(1,14561273,1,1,2)  
[2025-02-26 10:50:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561273', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561273', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:50:26] Production.INFO: ==27053== Releasing lock...  
[2025-02-26 10:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:50:26] Production.INFO: 54 MB  #Memory Used#   
[2025-02-26 10:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:51:05
    [end_date_ymd] => 2025-02-26 10:51:05
    [RateCDR] => 1
)
  
[2025-02-26 10:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:51:05' and `end` < '2025-02-26 10:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:51:18] Production.INFO: count ==3506  
[2025-02-26 10:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:51:05 - End Time 2025-02-26 10:51:05  
[2025-02-26 10:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561278', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561278', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561278', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561278', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:51:20] Production.INFO: ProcessCDR(1,14561278,1,1,2)  
[2025-02-26 10:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561278', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561278', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:51:25] Production.INFO: ==27128== Releasing lock...  
[2025-02-26 10:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:51:25] Production.INFO: 54.5 MB  #Memory Used#   
[2025-02-26 10:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:52:05
    [end_date_ymd] => 2025-02-26 10:52:05
    [RateCDR] => 1
)
  
[2025-02-26 10:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:52:05' and `end` < '2025-02-26 10:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:52:18] Production.INFO: count ==3514  
[2025-02-26 10:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:52:05 - End Time 2025-02-26 10:52:05  
[2025-02-26 10:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561283', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561283', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:52:20] Production.INFO: ProcessCDR(1,14561283,1,1,2)  
[2025-02-26 10:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561283', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561283', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:52:25] Production.INFO: ==27203== Releasing lock...  
[2025-02-26 10:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:52:25] Production.INFO: 54.5 MB  #Memory Used#   
[2025-02-26 10:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:53:06
    [end_date_ymd] => 2025-02-26 10:53:06
    [RateCDR] => 1
)
  
[2025-02-26 10:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:53:06' and `end` < '2025-02-26 10:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:53:18] Production.INFO: count ==3537  
[2025-02-26 10:53:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:53:06 - End Time 2025-02-26 10:53:06  
[2025-02-26 10:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561288', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561288', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:53:20] Production.INFO: ProcessCDR(1,14561288,1,1,2)  
[2025-02-26 10:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561288', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561288', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:53:26] Production.INFO: ==27278== Releasing lock...  
[2025-02-26 10:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:53:26] Production.INFO: 54.75 MB  #Memory Used#   
[2025-02-26 10:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:54:05
    [end_date_ymd] => 2025-02-26 10:54:05
    [RateCDR] => 1
)
  
[2025-02-26 10:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:54:05' and `end` < '2025-02-26 10:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:54:18] Production.INFO: count ==3562  
[2025-02-26 10:54:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:54:05 - End Time 2025-02-26 10:54:05  
[2025-02-26 10:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561293', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561293', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:54:19] Production.INFO: ProcessCDR(1,14561293,1,1,2)  
[2025-02-26 10:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:54:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:54:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:54:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:54:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:54:25] Production.INFO: ==27356== Releasing lock...  
[2025-02-26 10:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:54:25] Production.INFO: 54.5 MB  #Memory Used#   
[2025-02-26 10:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:55:06
    [end_date_ymd] => 2025-02-26 10:55:06
    [RateCDR] => 1
)
  
[2025-02-26 10:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:55:06' and `end` < '2025-02-26 10:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:55:18] Production.INFO: count ==3578  
[2025-02-26 10:55:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:55:06 - End Time 2025-02-26 10:55:06  
[2025-02-26 10:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561298', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561298', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:55:20] Production.INFO: ProcessCDR(1,14561298,1,1,2)  
[2025-02-26 10:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:55:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:55:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:55:25] Production.INFO: ==27428== Releasing lock...  
[2025-02-26 10:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:55:25] Production.INFO: 55.25 MB  #Memory Used#   
[2025-02-26 10:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:56:05
    [end_date_ymd] => 2025-02-26 10:56:05
    [RateCDR] => 1
)
  
[2025-02-26 10:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:56:05' and `end` < '2025-02-26 10:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:56:18] Production.INFO: count ==3603  
[2025-02-26 10:56:19] Production.ERROR: pbx CDR StartTime 2025-02-26 07:56:05 - End Time 2025-02-26 10:56:05  
[2025-02-26 10:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561303', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561303', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:56:20] Production.INFO: ProcessCDR(1,14561303,1,1,2)  
[2025-02-26 10:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:56:25] Production.INFO: ==27501== Releasing lock...  
[2025-02-26 10:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:56:25] Production.INFO: 55 MB  #Memory Used#   
[2025-02-26 10:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:57:06
    [end_date_ymd] => 2025-02-26 10:57:06
    [RateCDR] => 1
)
  
[2025-02-26 10:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:57:06' and `end` < '2025-02-26 10:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:57:19] Production.INFO: count ==3640  
[2025-02-26 10:57:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:57:06 - End Time 2025-02-26 10:57:06  
[2025-02-26 10:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561308', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561308', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:57:21] Production.INFO: ProcessCDR(1,14561308,1,1,2)  
[2025-02-26 10:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:57:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:57:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:57:26] Production.INFO: ==27578== Releasing lock...  
[2025-02-26 10:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:57:26] Production.INFO: 55.5 MB  #Memory Used#   
[2025-02-26 10:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:58:05
    [end_date_ymd] => 2025-02-26 10:58:05
    [RateCDR] => 1
)
  
[2025-02-26 10:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:58:05' and `end` < '2025-02-26 10:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:58:18] Production.INFO: count ==3654  
[2025-02-26 10:58:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:58:05 - End Time 2025-02-26 10:58:05  
[2025-02-26 10:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561313', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561313', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:58:20] Production.INFO: ProcessCDR(1,14561313,1,1,2)  
[2025-02-26 10:58:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:58:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:58:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:58:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:58:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:58:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:58:25] Production.INFO: ==27650== Releasing lock...  
[2025-02-26 10:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:58:25] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 10:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 07:59:06
    [end_date_ymd] => 2025-02-26 10:59:06
    [RateCDR] => 1
)
  
[2025-02-26 10:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 07:59:06' and `end` < '2025-02-26 10:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 10:59:19] Production.INFO: count ==3661  
[2025-02-26 10:59:20] Production.ERROR: pbx CDR StartTime 2025-02-26 07:59:06 - End Time 2025-02-26 10:59:06  
[2025-02-26 10:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 10:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561318', 'tblTempVendorCDR_20' ) start  
[2025-02-26 10:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561318', 'tblTempVendorCDR_20' ) end  
[2025-02-26 10:59:20] Production.INFO: ProcessCDR(1,14561318,1,1,2)  
[2025-02-26 10:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 10:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 10:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 10:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 10:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 10:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 10:59:24] Production.INFO: ==27729== Releasing lock...  
[2025-02-26 10:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 10:59:24] Production.INFO: 55.5 MB  #Memory Used#   
[2025-02-26 11:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:00:06
    [end_date_ymd] => 2025-02-26 11:00:06
    [RateCDR] => 1
)
  
[2025-02-26 11:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:00:06' and `end` < '2025-02-26 11:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:00:19] Production.INFO: count ==3674  
[2025-02-26 11:00:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:00:06 - End Time 2025-02-26 11:00:06  
[2025-02-26 11:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561324', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561324', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561324', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561324', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:00:21] Production.INFO: ProcessCDR(1,14561324,1,1,2)  
[2025-02-26 11:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:00:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:00:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:00:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561324', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561324', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:00:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:00:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:00:26] Production.INFO: ==27804== Releasing lock...  
[2025-02-26 11:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:00:26] Production.INFO: 55.75 MB  #Memory Used#   
[2025-02-26 11:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:01:06
    [end_date_ymd] => 2025-02-26 11:01:06
    [RateCDR] => 1
)
  
[2025-02-26 11:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:01:06' and `end` < '2025-02-26 11:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:01:20] Production.INFO: count ==3762  
[2025-02-26 11:01:22] Production.ERROR: pbx CDR StartTime 2025-02-26 08:01:06 - End Time 2025-02-26 11:01:06  
[2025-02-26 11:01:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561329', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561329', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561329', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561329', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:01:22] Production.INFO: ProcessCDR(1,14561329,1,1,2)  
[2025-02-26 11:01:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:01:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:01:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:01:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561329', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561329', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:01:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:01:28] Production.INFO: ==27970== Releasing lock...  
[2025-02-26 11:01:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:01:28] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 11:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:02:05
    [end_date_ymd] => 2025-02-26 11:02:05
    [RateCDR] => 1
)
  
[2025-02-26 11:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:02:05' and `end` < '2025-02-26 11:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:02:18] Production.INFO: count ==3773  
[2025-02-26 11:02:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:02:05 - End Time 2025-02-26 11:02:05  
[2025-02-26 11:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561334', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561334', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561334', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561334', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:02:20] Production.INFO: ProcessCDR(1,14561334,1,1,2)  
[2025-02-26 11:02:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:02:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561334', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561334', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:02:26] Production.INFO: ==28043== Releasing lock...  
[2025-02-26 11:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:02:26] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 11:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:03:06
    [end_date_ymd] => 2025-02-26 11:03:06
    [RateCDR] => 1
)
  
[2025-02-26 11:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:03:06' and `end` < '2025-02-26 11:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:03:18] Production.INFO: count ==3785  
[2025-02-26 11:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:03:06 - End Time 2025-02-26 11:03:06  
[2025-02-26 11:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561339', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561339', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561339', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561339', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:03:20] Production.INFO: ProcessCDR(1,14561339,1,1,2)  
[2025-02-26 11:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561339', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561339', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:03:26] Production.INFO: ==28116== Releasing lock...  
[2025-02-26 11:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:03:26] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 11:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:04:05
    [end_date_ymd] => 2025-02-26 11:04:05
    [RateCDR] => 1
)
  
[2025-02-26 11:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:04:05' and `end` < '2025-02-26 11:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:04:18] Production.INFO: count ==3789  
[2025-02-26 11:04:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:04:05 - End Time 2025-02-26 11:04:05  
[2025-02-26 11:04:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561344', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561344', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:04:20] Production.INFO: ProcessCDR(1,14561344,1,1,2)  
[2025-02-26 11:04:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:04:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:04:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:04:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:04:25] Production.INFO: ==28230== Releasing lock...  
[2025-02-26 11:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:04:25] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 11:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:05:06
    [end_date_ymd] => 2025-02-26 11:05:06
    [RateCDR] => 1
)
  
[2025-02-26 11:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:05:06' and `end` < '2025-02-26 11:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:05:19] Production.INFO: count ==3804  
[2025-02-26 11:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:05:06 - End Time 2025-02-26 11:05:06  
[2025-02-26 11:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561349', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561349', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:05:21] Production.INFO: ProcessCDR(1,14561349,1,1,2)  
[2025-02-26 11:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:05:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:05:26] Production.INFO: ==28382== Releasing lock...  
[2025-02-26 11:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:05:26] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 11:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:06:05
    [end_date_ymd] => 2025-02-26 11:06:05
    [RateCDR] => 1
)
  
[2025-02-26 11:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:06:05' and `end` < '2025-02-26 11:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:06:18] Production.INFO: count ==3813  
[2025-02-26 11:06:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:06:05 - End Time 2025-02-26 11:06:05  
[2025-02-26 11:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561354', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561354', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561354', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561354', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:06:20] Production.INFO: ProcessCDR(1,14561354,1,1,2)  
[2025-02-26 11:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561354', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561354', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:06:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:06:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:06:25] Production.INFO: ==28455== Releasing lock...  
[2025-02-26 11:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:06:25] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 11:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:07:06
    [end_date_ymd] => 2025-02-26 11:07:06
    [RateCDR] => 1
)
  
[2025-02-26 11:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:07:06' and `end` < '2025-02-26 11:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:07:19] Production.INFO: count ==3833  
[2025-02-26 11:07:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:07:06 - End Time 2025-02-26 11:07:06  
[2025-02-26 11:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561359', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561359', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561359', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561359', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:07:21] Production.INFO: ProcessCDR(1,14561359,1,1,2)  
[2025-02-26 11:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:07:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561359', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561359', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:07:26] Production.INFO: ==28524== Releasing lock...  
[2025-02-26 11:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:07:26] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 11:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:08:05
    [end_date_ymd] => 2025-02-26 11:08:05
    [RateCDR] => 1
)
  
[2025-02-26 11:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:08:05' and `end` < '2025-02-26 11:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:08:18] Production.INFO: count ==3838  
[2025-02-26 11:08:23] Production.ERROR: pbx CDR StartTime 2025-02-26 08:08:05 - End Time 2025-02-26 11:08:05  
[2025-02-26 11:08:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:08:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:08:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:08:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561364', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:08:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561364', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:08:23] Production.INFO: ProcessCDR(1,14561364,1,1,2)  
[2025-02-26 11:08:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:08:27] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:08:27] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:08:30] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:08:30] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:08:30] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:08:30] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:08:30] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:08:30] Production.INFO: ==28679== Releasing lock...  
[2025-02-26 11:08:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:08:30] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 11:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:09:05
    [end_date_ymd] => 2025-02-26 11:09:05
    [RateCDR] => 1
)
  
[2025-02-26 11:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:09:05' and `end` < '2025-02-26 11:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:09:18] Production.INFO: count ==3835  
[2025-02-26 11:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:09:05 - End Time 2025-02-26 11:09:05  
[2025-02-26 11:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561369', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561369', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:09:20] Production.INFO: ProcessCDR(1,14561369,1,1,2)  
[2025-02-26 11:09:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:09:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:09:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:09:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:09:25] Production.INFO: ==28755== Releasing lock...  
[2025-02-26 11:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:09:25] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 11:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:10:06
    [end_date_ymd] => 2025-02-26 11:10:06
    [RateCDR] => 1
)
  
[2025-02-26 11:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:10:06' and `end` < '2025-02-26 11:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:10:19] Production.INFO: count ==3863  
[2025-02-26 11:10:22] Production.ERROR: pbx CDR StartTime 2025-02-26 08:10:06 - End Time 2025-02-26 11:10:06  
[2025-02-26 11:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561375', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561375', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:10:22] Production.INFO: ProcessCDR(1,14561375,1,1,2)  
[2025-02-26 11:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561375', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561375', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:10:28] Production.INFO: ==28838== Releasing lock...  
[2025-02-26 11:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:10:28] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 11:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:11:06
    [end_date_ymd] => 2025-02-26 11:11:06
    [RateCDR] => 1
)
  
[2025-02-26 11:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:11:06' and `end` < '2025-02-26 11:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:11:19] Production.INFO: count ==3900  
[2025-02-26 11:11:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:11:06 - End Time 2025-02-26 11:11:06  
[2025-02-26 11:11:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561380', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561380', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:11:21] Production.INFO: ProcessCDR(1,14561380,1,1,2)  
[2025-02-26 11:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:11:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:11:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:11:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561380', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561380', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:11:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:11:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:11:26] Production.INFO: ==28959== Releasing lock...  
[2025-02-26 11:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:11:26] Production.INFO: 57.25 MB  #Memory Used#   
[2025-02-26 11:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:12:06
    [end_date_ymd] => 2025-02-26 11:12:06
    [RateCDR] => 1
)
  
[2025-02-26 11:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:12:06' and `end` < '2025-02-26 11:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:12:18] Production.INFO: count ==3911  
[2025-02-26 11:12:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:12:06 - End Time 2025-02-26 11:12:06  
[2025-02-26 11:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561385', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561385', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:12:20] Production.INFO: ProcessCDR(1,14561385,1,1,2)  
[2025-02-26 11:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561385', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561385', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:12:26] Production.INFO: ==29153== Releasing lock...  
[2025-02-26 11:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:12:26] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 11:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:13:05
    [end_date_ymd] => 2025-02-26 11:13:05
    [RateCDR] => 1
)
  
[2025-02-26 11:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:13:05' and `end` < '2025-02-26 11:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:13:18] Production.INFO: count ==3925  
[2025-02-26 11:13:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:13:05 - End Time 2025-02-26 11:13:05  
[2025-02-26 11:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561390', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561390', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561390', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561390', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:13:20] Production.INFO: ProcessCDR(1,14561390,1,1,2)  
[2025-02-26 11:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561390', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561390', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:13:26] Production.INFO: ==29226== Releasing lock...  
[2025-02-26 11:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:13:26] Production.INFO: 57.25 MB  #Memory Used#   
[2025-02-26 11:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:14:06
    [end_date_ymd] => 2025-02-26 11:14:06
    [RateCDR] => 1
)
  
[2025-02-26 11:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:14:06' and `end` < '2025-02-26 11:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:14:19] Production.INFO: count ==3933  
[2025-02-26 11:14:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:14:06 - End Time 2025-02-26 11:14:06  
[2025-02-26 11:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561395', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561395', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561395', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561395', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:14:21] Production.INFO: ProcessCDR(1,14561395,1,1,2)  
[2025-02-26 11:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:14:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561395', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561395', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:14:26] Production.INFO: ==29302== Releasing lock...  
[2025-02-26 11:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:14:26] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 11:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:15:06
    [end_date_ymd] => 2025-02-26 11:15:06
    [RateCDR] => 1
)
  
[2025-02-26 11:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:15:06' and `end` < '2025-02-26 11:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:15:18] Production.INFO: count ==3948  
[2025-02-26 11:15:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:15:06 - End Time 2025-02-26 11:15:06  
[2025-02-26 11:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561400', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561400', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:15:20] Production.INFO: ProcessCDR(1,14561400,1,1,2)  
[2025-02-26 11:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:15:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:15:26] Production.INFO: ==29482== Releasing lock...  
[2025-02-26 11:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:15:26] Production.INFO: 57.75 MB  #Memory Used#   
[2025-02-26 11:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:16:06
    [end_date_ymd] => 2025-02-26 11:16:06
    [RateCDR] => 1
)
  
[2025-02-26 11:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:16:06' and `end` < '2025-02-26 11:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:16:19] Production.INFO: count ==3962  
[2025-02-26 11:16:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:16:06 - End Time 2025-02-26 11:16:06  
[2025-02-26 11:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561405', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561405', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561405', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561405', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:16:21] Production.INFO: ProcessCDR(1,14561405,1,1,2)  
[2025-02-26 11:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561405', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561405', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:16:26] Production.INFO: ==29569== Releasing lock...  
[2025-02-26 11:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:16:26] Production.INFO: 57.75 MB  #Memory Used#   
[2025-02-26 11:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:17:06
    [end_date_ymd] => 2025-02-26 11:17:06
    [RateCDR] => 1
)
  
[2025-02-26 11:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:17:06' and `end` < '2025-02-26 11:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:17:18] Production.INFO: count ==3963  
[2025-02-26 11:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:17:06 - End Time 2025-02-26 11:17:06  
[2025-02-26 11:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561410', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561410', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561410', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561410', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:17:20] Production.INFO: ProcessCDR(1,14561410,1,1,2)  
[2025-02-26 11:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561410', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561410', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:17:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:17:26] Production.INFO: ==29640== Releasing lock...  
[2025-02-26 11:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:17:26] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 11:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:18:06
    [end_date_ymd] => 2025-02-26 11:18:06
    [RateCDR] => 1
)
  
[2025-02-26 11:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:18:06' and `end` < '2025-02-26 11:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:18:19] Production.INFO: count ==3969  
[2025-02-26 11:18:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:18:06 - End Time 2025-02-26 11:18:06  
[2025-02-26 11:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561415', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561415', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:18:21] Production.INFO: ProcessCDR(1,14561415,1,1,2)  
[2025-02-26 11:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:18:26] Production.INFO: ==29720== Releasing lock...  
[2025-02-26 11:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:18:26] Production.INFO: 57.75 MB  #Memory Used#   
[2025-02-26 11:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:19:06
    [end_date_ymd] => 2025-02-26 11:19:06
    [RateCDR] => 1
)
  
[2025-02-26 11:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:19:06' and `end` < '2025-02-26 11:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:19:19] Production.INFO: count ==3982  
[2025-02-26 11:19:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:19:06 - End Time 2025-02-26 11:19:06  
[2025-02-26 11:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561420', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561420', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:19:21] Production.INFO: ProcessCDR(1,14561420,1,1,2)  
[2025-02-26 11:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:19:26] Production.INFO: ==29841== Releasing lock...  
[2025-02-26 11:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:19:26] Production.INFO: 58.25 MB  #Memory Used#   
[2025-02-26 11:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:20:07
    [end_date_ymd] => 2025-02-26 11:20:07
    [RateCDR] => 1
)
  
[2025-02-26 11:20:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:20:07' and `end` < '2025-02-26 11:20:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:20:20] Production.INFO: count ==4006  
[2025-02-26 11:20:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:20:07 - End Time 2025-02-26 11:20:07  
[2025-02-26 11:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561426', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561426', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:20:22] Production.INFO: ProcessCDR(1,14561426,1,1,2)  
[2025-02-26 11:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:20:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561426', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561426', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:20:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:20:27] Production.INFO: ==29919== Releasing lock...  
[2025-02-26 11:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:20:27] Production.INFO: 58 MB  #Memory Used#   
[2025-02-26 11:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:21:05
    [end_date_ymd] => 2025-02-26 11:21:05
    [RateCDR] => 1
)
  
[2025-02-26 11:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:21:05' and `end` < '2025-02-26 11:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:21:18] Production.INFO: count ==4077  
[2025-02-26 11:21:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:21:05 - End Time 2025-02-26 11:21:05  
[2025-02-26 11:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561431', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561431', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:21:20] Production.INFO: ProcessCDR(1,14561431,1,1,2)  
[2025-02-26 11:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561431', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561431', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:21:26] Production.INFO: ==29993== Releasing lock...  
[2025-02-26 11:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:21:26] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:22:06
    [end_date_ymd] => 2025-02-26 11:22:06
    [RateCDR] => 1
)
  
[2025-02-26 11:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:22:06' and `end` < '2025-02-26 11:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:22:19] Production.INFO: count ==4078  
[2025-02-26 11:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:22:06 - End Time 2025-02-26 11:22:06  
[2025-02-26 11:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561436', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561436', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561436', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561436', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:22:21] Production.INFO: ProcessCDR(1,14561436,1,1,2)  
[2025-02-26 11:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:22:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561436', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561436', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:22:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:22:26] Production.INFO: ==30067== Releasing lock...  
[2025-02-26 11:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:22:26] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:23:05
    [end_date_ymd] => 2025-02-26 11:23:05
    [RateCDR] => 1
)
  
[2025-02-26 11:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:23:05' and `end` < '2025-02-26 11:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:23:18] Production.INFO: count ==4085  
[2025-02-26 11:23:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:23:05 - End Time 2025-02-26 11:23:05  
[2025-02-26 11:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561441', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561441', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561441', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561441', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:23:20] Production.INFO: ProcessCDR(1,14561441,1,1,2)  
[2025-02-26 11:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561441', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561441', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:23:25] Production.INFO: ==30139== Releasing lock...  
[2025-02-26 11:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:23:25] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:24:06
    [end_date_ymd] => 2025-02-26 11:24:06
    [RateCDR] => 1
)
  
[2025-02-26 11:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:24:06' and `end` < '2025-02-26 11:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:24:19] Production.INFO: count ==4090  
[2025-02-26 11:24:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:24:06 - End Time 2025-02-26 11:24:06  
[2025-02-26 11:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561446', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561446', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:24:21] Production.INFO: ProcessCDR(1,14561446,1,1,2)  
[2025-02-26 11:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:24:26] Production.INFO: ==30214== Releasing lock...  
[2025-02-26 11:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:24:26] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:25:05
    [end_date_ymd] => 2025-02-26 11:25:05
    [RateCDR] => 1
)
  
[2025-02-26 11:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:25:05' and `end` < '2025-02-26 11:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:25:18] Production.INFO: count ==4091  
[2025-02-26 11:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:25:05 - End Time 2025-02-26 11:25:05  
[2025-02-26 11:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561451', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561451', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:25:20] Production.INFO: ProcessCDR(1,14561451,1,1,2)  
[2025-02-26 11:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:25:25] Production.INFO: ==30286== Releasing lock...  
[2025-02-26 11:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:25:25] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:26:05
    [end_date_ymd] => 2025-02-26 11:26:05
    [RateCDR] => 1
)
  
[2025-02-26 11:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:26:05' and `end` < '2025-02-26 11:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:26:18] Production.INFO: count ==4090  
[2025-02-26 11:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:26:05 - End Time 2025-02-26 11:26:05  
[2025-02-26 11:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561456', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561456', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561456', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561456', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:26:20] Production.INFO: ProcessCDR(1,14561456,1,1,2)  
[2025-02-26 11:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561456', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561456', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:26:26] Production.INFO: ==30358== Releasing lock...  
[2025-02-26 11:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:26:26] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 11:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:27:05
    [end_date_ymd] => 2025-02-26 11:27:05
    [RateCDR] => 1
)
  
[2025-02-26 11:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:27:05' and `end` < '2025-02-26 11:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:27:18] Production.INFO: count ==4097  
[2025-02-26 11:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:27:05 - End Time 2025-02-26 11:27:05  
[2025-02-26 11:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561461', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561461', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561461', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561461', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:27:20] Production.INFO: ProcessCDR(1,14561461,1,1,2)  
[2025-02-26 11:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561461', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561461', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:27:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:27:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:27:26] Production.INFO: ==30428== Releasing lock...  
[2025-02-26 11:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:27:26] Production.INFO: 59 MB  #Memory Used#   
[2025-02-26 11:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:28:06
    [end_date_ymd] => 2025-02-26 11:28:06
    [RateCDR] => 1
)
  
[2025-02-26 11:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:28:06' and `end` < '2025-02-26 11:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:28:18] Production.INFO: count ==4102  
[2025-02-26 11:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:28:06 - End Time 2025-02-26 11:28:06  
[2025-02-26 11:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561466', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561466', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561466', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561466', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:28:20] Production.INFO: ProcessCDR(1,14561466,1,1,2)  
[2025-02-26 11:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:28:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561466', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561466', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:28:26] Production.INFO: ==30500== Releasing lock...  
[2025-02-26 11:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:28:26] Production.INFO: 58.75 MB  #Memory Used#   
[2025-02-26 11:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:29:06
    [end_date_ymd] => 2025-02-26 11:29:06
    [RateCDR] => 1
)
  
[2025-02-26 11:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:29:06' and `end` < '2025-02-26 11:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:29:18] Production.INFO: count ==4098  
[2025-02-26 11:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:29:06 - End Time 2025-02-26 11:29:06  
[2025-02-26 11:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561471', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561471', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:29:20] Production.INFO: ProcessCDR(1,14561471,1,1,2)  
[2025-02-26 11:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:29:26] Production.INFO: ==30572== Releasing lock...  
[2025-02-26 11:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:29:26] Production.INFO: 58.75 MB  #Memory Used#   
[2025-02-26 11:30:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:30:07
    [end_date_ymd] => 2025-02-26 11:30:07
    [RateCDR] => 1
)
  
[2025-02-26 11:30:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:30:07' and `end` < '2025-02-26 11:30:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:30:20] Production.INFO: count ==4102  
[2025-02-26 11:30:22] Production.ERROR: pbx CDR StartTime 2025-02-26 08:30:07 - End Time 2025-02-26 11:30:07  
[2025-02-26 11:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561477', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561477', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:30:22] Production.INFO: ProcessCDR(1,14561477,1,1,2)  
[2025-02-26 11:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:30:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:30:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561477', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561477', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:30:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:30:27] Production.INFO: ==30651== Releasing lock...  
[2025-02-26 11:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:30:27] Production.INFO: 58.75 MB  #Memory Used#   
[2025-02-26 11:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:31:05
    [end_date_ymd] => 2025-02-26 11:31:05
    [RateCDR] => 1
)
  
[2025-02-26 11:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:31:05' and `end` < '2025-02-26 11:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:31:18] Production.INFO: count ==4202  
[2025-02-26 11:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:31:05 - End Time 2025-02-26 11:31:05  
[2025-02-26 11:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561482', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561482', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:31:20] Production.INFO: ProcessCDR(1,14561482,1,1,2)  
[2025-02-26 11:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561482', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561482', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:31:25] Production.INFO: ==30725== Releasing lock...  
[2025-02-26 11:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:31:25] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 11:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:32:06
    [end_date_ymd] => 2025-02-26 11:32:06
    [RateCDR] => 1
)
  
[2025-02-26 11:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:32:06' and `end` < '2025-02-26 11:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:32:19] Production.INFO: count ==4185  
[2025-02-26 11:32:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:32:06 - End Time 2025-02-26 11:32:06  
[2025-02-26 11:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561487', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561487', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:32:21] Production.INFO: ProcessCDR(1,14561487,1,1,2)  
[2025-02-26 11:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561487', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561487', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:32:26] Production.INFO: ==30795== Releasing lock...  
[2025-02-26 11:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:32:26] Production.INFO: 59.25 MB  #Memory Used#   
[2025-02-26 11:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:33:05
    [end_date_ymd] => 2025-02-26 11:33:05
    [RateCDR] => 1
)
  
[2025-02-26 11:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:33:05' and `end` < '2025-02-26 11:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:33:18] Production.INFO: count ==4202  
[2025-02-26 11:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:33:05 - End Time 2025-02-26 11:33:05  
[2025-02-26 11:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561492', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561492', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561492', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561492', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:33:20] Production.INFO: ProcessCDR(1,14561492,1,1,2)  
[2025-02-26 11:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561492', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561492', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:33:26] Production.INFO: ==30873== Releasing lock...  
[2025-02-26 11:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:33:26] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 11:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:34:05
    [end_date_ymd] => 2025-02-26 11:34:05
    [RateCDR] => 1
)
  
[2025-02-26 11:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:34:05' and `end` < '2025-02-26 11:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:34:18] Production.INFO: count ==4206  
[2025-02-26 11:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:34:05 - End Time 2025-02-26 11:34:05  
[2025-02-26 11:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561497', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561497', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:34:20] Production.INFO: ProcessCDR(1,14561497,1,1,2)  
[2025-02-26 11:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:34:26] Production.INFO: ==30944== Releasing lock...  
[2025-02-26 11:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:34:26] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 11:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:35:06
    [end_date_ymd] => 2025-02-26 11:35:06
    [RateCDR] => 1
)
  
[2025-02-26 11:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:35:06' and `end` < '2025-02-26 11:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:35:19] Production.INFO: count ==4212  
[2025-02-26 11:35:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:35:06 - End Time 2025-02-26 11:35:06  
[2025-02-26 11:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561502', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561502', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:35:21] Production.INFO: ProcessCDR(1,14561502,1,1,2)  
[2025-02-26 11:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:35:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:35:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:35:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:35:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:35:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:35:27] Production.INFO: ==31059== Releasing lock...  
[2025-02-26 11:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:35:27] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 11:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:36:06
    [end_date_ymd] => 2025-02-26 11:36:06
    [RateCDR] => 1
)
  
[2025-02-26 11:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:36:06' and `end` < '2025-02-26 11:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:36:19] Production.INFO: count ==4220  
[2025-02-26 11:36:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:36:06 - End Time 2025-02-26 11:36:06  
[2025-02-26 11:36:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561507', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561507', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561507', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561507', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:36:21] Production.INFO: ProcessCDR(1,14561507,1,1,2)  
[2025-02-26 11:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:36:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:36:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561507', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:36:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561507', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:36:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:36:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:36:27] Production.INFO: ==31131== Releasing lock...  
[2025-02-26 11:36:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:36:27] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 11:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:37:06
    [end_date_ymd] => 2025-02-26 11:37:06
    [RateCDR] => 1
)
  
[2025-02-26 11:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:37:06' and `end` < '2025-02-26 11:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:37:18] Production.INFO: count ==4227  
[2025-02-26 11:37:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:37:06 - End Time 2025-02-26 11:37:06  
[2025-02-26 11:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561512', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561512', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561512', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561512', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:37:20] Production.INFO: ProcessCDR(1,14561512,1,1,2)  
[2025-02-26 11:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:37:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:37:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:37:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561512', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561512', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:37:26] Production.INFO: ==31208== Releasing lock...  
[2025-02-26 11:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:37:26] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 11:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:38:06
    [end_date_ymd] => 2025-02-26 11:38:06
    [RateCDR] => 1
)
  
[2025-02-26 11:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:38:06' and `end` < '2025-02-26 11:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:38:19] Production.INFO: count ==4232  
[2025-02-26 11:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:38:06 - End Time 2025-02-26 11:38:06  
[2025-02-26 11:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561517', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561517', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:38:21] Production.INFO: ProcessCDR(1,14561517,1,1,2)  
[2025-02-26 11:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:38:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:38:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:38:26] Production.INFO: ==31278== Releasing lock...  
[2025-02-26 11:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:38:26] Production.INFO: 59.75 MB  #Memory Used#   
[2025-02-26 11:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:39:05
    [end_date_ymd] => 2025-02-26 11:39:05
    [RateCDR] => 1
)
  
[2025-02-26 11:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:39:05' and `end` < '2025-02-26 11:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:39:18] Production.INFO: count ==4234  
[2025-02-26 11:39:19] Production.ERROR: pbx CDR StartTime 2025-02-26 08:39:05 - End Time 2025-02-26 11:39:05  
[2025-02-26 11:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561522', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561522', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:39:20] Production.INFO: ProcessCDR(1,14561522,1,1,2)  
[2025-02-26 11:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:39:25] Production.INFO: ==31350== Releasing lock...  
[2025-02-26 11:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:39:25] Production.INFO: 59.75 MB  #Memory Used#   
[2025-02-26 11:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:40:06
    [end_date_ymd] => 2025-02-26 11:40:06
    [RateCDR] => 1
)
  
[2025-02-26 11:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:40:06' and `end` < '2025-02-26 11:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:40:19] Production.INFO: count ==4239  
[2025-02-26 11:40:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:40:06 - End Time 2025-02-26 11:40:06  
[2025-02-26 11:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561527', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561527', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:40:21] Production.INFO: ProcessCDR(1,14561527,1,1,2)  
[2025-02-26 11:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:40:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:40:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:40:27] Production.INFO: ==31426== Releasing lock...  
[2025-02-26 11:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:40:27] Production.INFO: 59.75 MB  #Memory Used#   
[2025-02-26 11:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:41:06
    [end_date_ymd] => 2025-02-26 11:41:06
    [RateCDR] => 1
)
  
[2025-02-26 11:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:41:06' and `end` < '2025-02-26 11:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:41:19] Production.INFO: count ==4300  
[2025-02-26 11:41:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:41:06 - End Time 2025-02-26 11:41:06  
[2025-02-26 11:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561533', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561533', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:41:21] Production.INFO: ProcessCDR(1,14561533,1,1,2)  
[2025-02-26 11:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:41:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:41:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561533', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561533', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:41:26] Production.INFO: ==31501== Releasing lock...  
[2025-02-26 11:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:41:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 11:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:42:05
    [end_date_ymd] => 2025-02-26 11:42:05
    [RateCDR] => 1
)
  
[2025-02-26 11:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:42:05' and `end` < '2025-02-26 11:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:42:18] Production.INFO: count ==4317  
[2025-02-26 11:42:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:42:05 - End Time 2025-02-26 11:42:05  
[2025-02-26 11:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561538', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561538', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561538', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561538', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:42:20] Production.INFO: ProcessCDR(1,14561538,1,1,2)  
[2025-02-26 11:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561538', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561538', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:42:26] Production.INFO: ==31571== Releasing lock...  
[2025-02-26 11:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:42:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 11:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:43:06
    [end_date_ymd] => 2025-02-26 11:43:06
    [RateCDR] => 1
)
  
[2025-02-26 11:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:43:06' and `end` < '2025-02-26 11:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:43:19] Production.INFO: count ==4330  
[2025-02-26 11:43:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:43:06 - End Time 2025-02-26 11:43:06  
[2025-02-26 11:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561543', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561543', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561543', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561543', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:43:21] Production.INFO: ProcessCDR(1,14561543,1,1,2)  
[2025-02-26 11:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:43:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:43:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:43:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:43:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561543', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:43:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561543', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:43:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:43:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:43:27] Production.INFO: ==31642== Releasing lock...  
[2025-02-26 11:43:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:43:27] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 11:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:44:05
    [end_date_ymd] => 2025-02-26 11:44:05
    [RateCDR] => 1
)
  
[2025-02-26 11:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:44:05' and `end` < '2025-02-26 11:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:44:18] Production.INFO: count ==4346  
[2025-02-26 11:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:44:05 - End Time 2025-02-26 11:44:05  
[2025-02-26 11:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561548', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561548', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561548', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561548', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:44:21] Production.INFO: ProcessCDR(1,14561548,1,1,2)  
[2025-02-26 11:44:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:44:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561548', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561548', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:44:27] Production.INFO: ==31713== Releasing lock...  
[2025-02-26 11:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:44:27] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 11:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:45:06
    [end_date_ymd] => 2025-02-26 11:45:06
    [RateCDR] => 1
)
  
[2025-02-26 11:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:45:06' and `end` < '2025-02-26 11:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:45:19] Production.INFO: count ==4353  
[2025-02-26 11:45:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:45:06 - End Time 2025-02-26 11:45:06  
[2025-02-26 11:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561553', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561553', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:45:21] Production.INFO: ProcessCDR(1,14561553,1,1,2)  
[2025-02-26 11:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:45:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:45:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:45:27] Production.INFO: ==31785== Releasing lock...  
[2025-02-26 11:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:45:27] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 11:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:46:05
    [end_date_ymd] => 2025-02-26 11:46:05
    [RateCDR] => 1
)
  
[2025-02-26 11:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:46:05' and `end` < '2025-02-26 11:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:46:18] Production.INFO: count ==4369  
[2025-02-26 11:46:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:46:05 - End Time 2025-02-26 11:46:05  
[2025-02-26 11:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561558', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561558', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:46:20] Production.INFO: ProcessCDR(1,14561558,1,1,2)  
[2025-02-26 11:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:46:26] Production.INFO: ==31855== Releasing lock...  
[2025-02-26 11:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:46:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 11:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:47:06
    [end_date_ymd] => 2025-02-26 11:47:06
    [RateCDR] => 1
)
  
[2025-02-26 11:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:47:06' and `end` < '2025-02-26 11:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:47:19] Production.INFO: count ==4364  
[2025-02-26 11:47:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:47:06 - End Time 2025-02-26 11:47:06  
[2025-02-26 11:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561563', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561563', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561563', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561563', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:47:21] Production.INFO: ProcessCDR(1,14561563,1,1,2)  
[2025-02-26 11:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:47:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:47:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561563', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561563', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:47:26] Production.INFO: ==31927== Releasing lock...  
[2025-02-26 11:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:47:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 11:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:48:05
    [end_date_ymd] => 2025-02-26 11:48:05
    [RateCDR] => 1
)
  
[2025-02-26 11:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:48:05' and `end` < '2025-02-26 11:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:48:18] Production.INFO: count ==4380  
[2025-02-26 11:48:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:48:05 - End Time 2025-02-26 11:48:05  
[2025-02-26 11:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561568', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561568', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:48:21] Production.INFO: ProcessCDR(1,14561568,1,1,2)  
[2025-02-26 11:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:48:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:48:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:48:26] Production.INFO: ==32000== Releasing lock...  
[2025-02-26 11:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:48:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 11:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:49:05
    [end_date_ymd] => 2025-02-26 11:49:05
    [RateCDR] => 1
)
  
[2025-02-26 11:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:49:05' and `end` < '2025-02-26 11:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:49:18] Production.INFO: count ==4401  
[2025-02-26 11:49:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:49:05 - End Time 2025-02-26 11:49:05  
[2025-02-26 11:49:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561573', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561573', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:49:21] Production.INFO: ProcessCDR(1,14561573,1,1,2)  
[2025-02-26 11:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:49:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:49:26] Production.INFO: ==32073== Releasing lock...  
[2025-02-26 11:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:49:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 11:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:50:06
    [end_date_ymd] => 2025-02-26 11:50:06
    [RateCDR] => 1
)
  
[2025-02-26 11:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:50:06' and `end` < '2025-02-26 11:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:50:19] Production.INFO: count ==4408  
[2025-02-26 11:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:50:06 - End Time 2025-02-26 11:50:06  
[2025-02-26 11:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561578', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561578', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:50:21] Production.INFO: ProcessCDR(1,14561578,1,1,2)  
[2025-02-26 11:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:50:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:50:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:50:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:50:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:50:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:50:27] Production.INFO: ==32185== Releasing lock...  
[2025-02-26 11:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:50:27] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 11:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:51:06
    [end_date_ymd] => 2025-02-26 11:51:06
    [RateCDR] => 1
)
  
[2025-02-26 11:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:51:06' and `end` < '2025-02-26 11:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:51:19] Production.INFO: count ==4466  
[2025-02-26 11:51:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:51:06 - End Time 2025-02-26 11:51:06  
[2025-02-26 11:51:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561584', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561584', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:51:21] Production.INFO: ProcessCDR(1,14561584,1,1,2)  
[2025-02-26 11:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:51:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:51:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:51:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561584', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561584', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:51:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:51:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:51:26] Production.INFO: ==32260== Releasing lock...  
[2025-02-26 11:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:51:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 11:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:52:05
    [end_date_ymd] => 2025-02-26 11:52:05
    [RateCDR] => 1
)
  
[2025-02-26 11:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:52:05' and `end` < '2025-02-26 11:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:52:18] Production.INFO: count ==4469  
[2025-02-26 11:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:52:05 - End Time 2025-02-26 11:52:05  
[2025-02-26 11:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561589', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561589', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:52:20] Production.INFO: ProcessCDR(1,14561589,1,1,2)  
[2025-02-26 11:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561589', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561589', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:52:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:52:26] Production.INFO: ==32332== Releasing lock...  
[2025-02-26 11:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:52:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 11:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:53:06
    [end_date_ymd] => 2025-02-26 11:53:06
    [RateCDR] => 1
)
  
[2025-02-26 11:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:53:06' and `end` < '2025-02-26 11:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:53:19] Production.INFO: count ==4479  
[2025-02-26 11:53:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:53:06 - End Time 2025-02-26 11:53:06  
[2025-02-26 11:53:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561594', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561594', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561594', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561594', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:53:21] Production.INFO: ProcessCDR(1,14561594,1,1,2)  
[2025-02-26 11:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:53:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:53:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561594', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561594', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:53:26] Production.INFO: ==32403== Releasing lock...  
[2025-02-26 11:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:53:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 11:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:54:05
    [end_date_ymd] => 2025-02-26 11:54:05
    [RateCDR] => 1
)
  
[2025-02-26 11:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:54:05' and `end` < '2025-02-26 11:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:54:18] Production.INFO: count ==4484  
[2025-02-26 11:54:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:54:05 - End Time 2025-02-26 11:54:05  
[2025-02-26 11:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561599', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561599', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:54:21] Production.INFO: ProcessCDR(1,14561599,1,1,2)  
[2025-02-26 11:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:54:26] Production.INFO: ==32473== Releasing lock...  
[2025-02-26 11:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:54:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 11:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:55:06
    [end_date_ymd] => 2025-02-26 11:55:06
    [RateCDR] => 1
)
  
[2025-02-26 11:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:55:06' and `end` < '2025-02-26 11:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:55:19] Production.INFO: count ==4492  
[2025-02-26 11:55:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:55:06 - End Time 2025-02-26 11:55:06  
[2025-02-26 11:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561604', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561604', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561604', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561604', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:55:21] Production.INFO: ProcessCDR(1,14561604,1,1,2)  
[2025-02-26 11:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:55:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:55:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:55:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:55:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561604', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:55:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561604', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:55:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:55:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:55:27] Production.INFO: ==32544== Releasing lock...  
[2025-02-26 11:55:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:55:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 11:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:56:06
    [end_date_ymd] => 2025-02-26 11:56:06
    [RateCDR] => 1
)
  
[2025-02-26 11:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:56:06' and `end` < '2025-02-26 11:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:56:19] Production.INFO: count ==4511  
[2025-02-26 11:56:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:56:06 - End Time 2025-02-26 11:56:06  
[2025-02-26 11:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561609', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561609', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561609', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561609', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:56:21] Production.INFO: ProcessCDR(1,14561609,1,1,2)  
[2025-02-26 11:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:56:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:56:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:56:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561609', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:56:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561609', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:56:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:56:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:56:27] Production.INFO: ==32618== Releasing lock...  
[2025-02-26 11:56:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:56:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 11:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:57:06
    [end_date_ymd] => 2025-02-26 11:57:06
    [RateCDR] => 1
)
  
[2025-02-26 11:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:57:06' and `end` < '2025-02-26 11:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:57:19] Production.INFO: count ==4515  
[2025-02-26 11:57:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:57:06 - End Time 2025-02-26 11:57:06  
[2025-02-26 11:57:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561614', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561614', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561614', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561614', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:57:21] Production.INFO: ProcessCDR(1,14561614,1,1,2)  
[2025-02-26 11:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:57:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:57:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:57:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561614', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561614', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:57:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:57:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:57:27] Production.INFO: ==32696== Releasing lock...  
[2025-02-26 11:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:57:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 11:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:58:05
    [end_date_ymd] => 2025-02-26 11:58:05
    [RateCDR] => 1
)
  
[2025-02-26 11:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:58:05' and `end` < '2025-02-26 11:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:58:18] Production.INFO: count ==4514  
[2025-02-26 11:58:20] Production.ERROR: pbx CDR StartTime 2025-02-26 08:58:05 - End Time 2025-02-26 11:58:05  
[2025-02-26 11:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561619', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561619', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:58:21] Production.INFO: ProcessCDR(1,14561619,1,1,2)  
[2025-02-26 11:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:58:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:58:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:58:26] Production.INFO: ==32767== Releasing lock...  
[2025-02-26 11:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:58:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 11:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 08:59:05
    [end_date_ymd] => 2025-02-26 11:59:05
    [RateCDR] => 1
)
  
[2025-02-26 11:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 08:59:05' and `end` < '2025-02-26 11:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 11:59:18] Production.INFO: count ==4514  
[2025-02-26 11:59:21] Production.ERROR: pbx CDR StartTime 2025-02-26 08:59:05 - End Time 2025-02-26 11:59:05  
[2025-02-26 11:59:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561624', 'tblTempVendorCDR_20' ) start  
[2025-02-26 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561624', 'tblTempVendorCDR_20' ) end  
[2025-02-26 11:59:21] Production.INFO: ProcessCDR(1,14561624,1,1,2)  
[2025-02-26 11:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:59:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 11:59:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:59:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 11:59:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 11:59:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 11:59:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 11:59:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 11:59:27] Production.INFO: ==390== Releasing lock...  
[2025-02-26 11:59:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 11:59:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 12:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:00:06
    [end_date_ymd] => 2025-02-26 12:00:06
    [RateCDR] => 1
)
  
[2025-02-26 12:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:00:06' and `end` < '2025-02-26 12:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:00:19] Production.INFO: count ==4514  
[2025-02-26 12:00:22] Production.ERROR: pbx CDR StartTime 2025-02-26 09:00:06 - End Time 2025-02-26 12:00:06  
[2025-02-26 12:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561630', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561630', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:00:22] Production.INFO: ProcessCDR(1,14561630,1,1,2)  
[2025-02-26 12:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561630', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561630', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:00:27] Production.INFO: ==464== Releasing lock...  
[2025-02-26 12:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:00:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 12:01:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:01:07
    [end_date_ymd] => 2025-02-26 12:01:07
    [RateCDR] => 1
)
  
[2025-02-26 12:01:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:01:07' and `end` < '2025-02-26 12:01:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:01:19] Production.INFO: count ==4569  
[2025-02-26 12:01:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:01:07 - End Time 2025-02-26 12:01:07  
[2025-02-26 12:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561635', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561635', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:01:22] Production.INFO: ProcessCDR(1,14561635,1,1,2)  
[2025-02-26 12:01:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:01:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:01:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:01:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561635', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561635', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:01:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:01:27] Production.INFO: ==553== Releasing lock...  
[2025-02-26 12:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:01:27] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:02:06
    [end_date_ymd] => 2025-02-26 12:02:06
    [RateCDR] => 1
)
  
[2025-02-26 12:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:02:06' and `end` < '2025-02-26 12:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:02:19] Production.INFO: count ==4550  
[2025-02-26 12:02:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:02:06 - End Time 2025-02-26 12:02:06  
[2025-02-26 12:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561640', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561640', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:02:21] Production.INFO: ProcessCDR(1,14561640,1,1,2)  
[2025-02-26 12:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561640', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561640', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:02:26] Production.INFO: ==640== Releasing lock...  
[2025-02-26 12:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:02:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:03:05
    [end_date_ymd] => 2025-02-26 12:03:05
    [RateCDR] => 1
)
  
[2025-02-26 12:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:03:05' and `end` < '2025-02-26 12:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:03:17] Production.INFO: count ==4546  
[2025-02-26 12:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:03:05 - End Time 2025-02-26 12:03:05  
[2025-02-26 12:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561645', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561645', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561645', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561645', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:03:20] Production.INFO: ProcessCDR(1,14561645,1,1,2)  
[2025-02-26 12:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561645', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561645', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:03:25] Production.INFO: ==736== Releasing lock...  
[2025-02-26 12:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:03:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:04:06
    [end_date_ymd] => 2025-02-26 12:04:06
    [RateCDR] => 1
)
  
[2025-02-26 12:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:04:06' and `end` < '2025-02-26 12:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:04:18] Production.INFO: count ==4553  
[2025-02-26 12:04:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:04:06 - End Time 2025-02-26 12:04:06  
[2025-02-26 12:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561650', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561650', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:04:21] Production.INFO: ProcessCDR(1,14561650,1,1,2)  
[2025-02-26 12:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:04:26] Production.INFO: ==810== Releasing lock...  
[2025-02-26 12:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:04:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:05:06
    [end_date_ymd] => 2025-02-26 12:05:06
    [RateCDR] => 1
)
  
[2025-02-26 12:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:05:06' and `end` < '2025-02-26 12:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:05:19] Production.INFO: count ==4543  
[2025-02-26 12:05:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:05:06 - End Time 2025-02-26 12:05:06  
[2025-02-26 12:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561655', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561655', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:05:21] Production.INFO: ProcessCDR(1,14561655,1,1,2)  
[2025-02-26 12:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:05:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:05:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:05:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:05:26] Production.INFO: ==881== Releasing lock...  
[2025-02-26 12:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:05:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:06:06
    [end_date_ymd] => 2025-02-26 12:06:06
    [RateCDR] => 1
)
  
[2025-02-26 12:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:06:06' and `end` < '2025-02-26 12:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:06:18] Production.INFO: count ==4536  
[2025-02-26 12:06:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:06:06 - End Time 2025-02-26 12:06:06  
[2025-02-26 12:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561660', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561660', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561660', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561660', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:06:20] Production.INFO: ProcessCDR(1,14561660,1,1,2)  
[2025-02-26 12:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561660', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561660', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:06:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:06:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:06:25] Production.INFO: ==991== Releasing lock...  
[2025-02-26 12:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:06:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:07:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:07:04
    [end_date_ymd] => 2025-02-26 12:07:04
    [RateCDR] => 1
)
  
[2025-02-26 12:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:07:04' and `end` < '2025-02-26 12:07:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:07:17] Production.INFO: count ==4529  
[2025-02-26 12:07:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:07:04 - End Time 2025-02-26 12:07:04  
[2025-02-26 12:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561665', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561665', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561665', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561665', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:07:20] Production.INFO: ProcessCDR(1,14561665,1,1,2)  
[2025-02-26 12:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561665', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561665', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:07:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:07:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:07:25] Production.INFO: ==1060== Releasing lock...  
[2025-02-26 12:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:07:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:08:05
    [end_date_ymd] => 2025-02-26 12:08:05
    [RateCDR] => 1
)
  
[2025-02-26 12:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:08:05' and `end` < '2025-02-26 12:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:08:18] Production.INFO: count ==4535  
[2025-02-26 12:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:08:05 - End Time 2025-02-26 12:08:05  
[2025-02-26 12:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561670', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561670', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:08:20] Production.INFO: ProcessCDR(1,14561670,1,1,2)  
[2025-02-26 12:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:08:25] Production.INFO: ==1135== Releasing lock...  
[2025-02-26 12:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:08:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:09:06
    [end_date_ymd] => 2025-02-26 12:09:06
    [RateCDR] => 1
)
  
[2025-02-26 12:09:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:09:06' and `end` < '2025-02-26 12:09:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:09:18] Production.INFO: count ==4539  
[2025-02-26 12:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:09:06 - End Time 2025-02-26 12:09:06  
[2025-02-26 12:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561675', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561675', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:09:21] Production.INFO: ProcessCDR(1,14561675,1,1,2)  
[2025-02-26 12:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:09:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:09:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:09:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:09:25] Production.INFO: ==1211== Releasing lock...  
[2025-02-26 12:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:09:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:10:06
    [end_date_ymd] => 2025-02-26 12:10:06
    [RateCDR] => 1
)
  
[2025-02-26 12:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:10:06' and `end` < '2025-02-26 12:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:10:18] Production.INFO: count ==4540  
[2025-02-26 12:10:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:10:06 - End Time 2025-02-26 12:10:06  
[2025-02-26 12:10:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561680', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561680', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:10:21] Production.INFO: ProcessCDR(1,14561680,1,1,2)  
[2025-02-26 12:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:10:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:10:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:10:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:10:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:10:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:10:26] Production.INFO: ==1297== Releasing lock...  
[2025-02-26 12:10:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:10:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 12:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:11:05
    [end_date_ymd] => 2025-02-26 12:11:05
    [RateCDR] => 1
)
  
[2025-02-26 12:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:11:05' and `end` < '2025-02-26 12:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:11:18] Production.INFO: count ==4603  
[2025-02-26 12:11:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:11:05 - End Time 2025-02-26 12:11:05  
[2025-02-26 12:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561686', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561686', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:11:20] Production.INFO: ProcessCDR(1,14561686,1,1,2)  
[2025-02-26 12:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:11:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:11:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:11:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561686', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561686', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:11:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:11:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:11:25] Production.INFO: ==1370== Releasing lock...  
[2025-02-26 12:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:11:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:12:08] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:12:08
    [end_date_ymd] => 2025-02-26 12:12:08
    [RateCDR] => 1
)
  
[2025-02-26 12:12:08] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:12:08' and `end` < '2025-02-26 12:12:08'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:12:21] Production.INFO: count ==4616  
[2025-02-26 12:12:23] Production.ERROR: pbx CDR StartTime 2025-02-26 09:12:08 - End Time 2025-02-26 12:12:08  
[2025-02-26 12:12:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:12:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:12:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:12:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561691', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:12:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561691', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:12:24] Production.INFO: ProcessCDR(1,14561691,1,1,2)  
[2025-02-26 12:12:24] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:12:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:12:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:12:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:12:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561691', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:12:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561691', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:12:29] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:12:29] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:12:29] Production.INFO: ==1444== Releasing lock...  
[2025-02-26 12:12:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:12:29] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:13:05
    [end_date_ymd] => 2025-02-26 12:13:05
    [RateCDR] => 1
)
  
[2025-02-26 12:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:13:05' and `end` < '2025-02-26 12:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:13:18] Production.INFO: count ==4607  
[2025-02-26 12:13:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:13:05 - End Time 2025-02-26 12:13:05  
[2025-02-26 12:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561696', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561696', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:13:21] Production.INFO: ProcessCDR(1,14561696,1,1,2)  
[2025-02-26 12:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561696', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561696', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:13:26] Production.INFO: ==1547== Releasing lock...  
[2025-02-26 12:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:13:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:14:05
    [end_date_ymd] => 2025-02-26 12:14:05
    [RateCDR] => 1
)
  
[2025-02-26 12:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:14:05' and `end` < '2025-02-26 12:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:14:17] Production.INFO: count ==4593  
[2025-02-26 12:14:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:14:05 - End Time 2025-02-26 12:14:05  
[2025-02-26 12:14:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561701', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561701', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:14:20] Production.INFO: ProcessCDR(1,14561701,1,1,2)  
[2025-02-26 12:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:14:25] Production.INFO: ==1622== Releasing lock...  
[2025-02-26 12:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:14:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:15:05
    [end_date_ymd] => 2025-02-26 12:15:05
    [RateCDR] => 1
)
  
[2025-02-26 12:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:15:05' and `end` < '2025-02-26 12:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:15:18] Production.INFO: count ==4611  
[2025-02-26 12:15:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:15:05 - End Time 2025-02-26 12:15:05  
[2025-02-26 12:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561706', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561706', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:15:21] Production.INFO: ProcessCDR(1,14561706,1,1,2)  
[2025-02-26 12:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:15:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:15:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:15:26] Production.INFO: ==1694== Releasing lock...  
[2025-02-26 12:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:15:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:16:06
    [end_date_ymd] => 2025-02-26 12:16:06
    [RateCDR] => 1
)
  
[2025-02-26 12:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:16:06' and `end` < '2025-02-26 12:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:16:19] Production.INFO: count ==4608  
[2025-02-26 12:16:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:16:06 - End Time 2025-02-26 12:16:06  
[2025-02-26 12:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561711', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561711', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:16:21] Production.INFO: ProcessCDR(1,14561711,1,1,2)  
[2025-02-26 12:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:16:26] Production.INFO: ==1772== Releasing lock...  
[2025-02-26 12:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:16:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:17:05
    [end_date_ymd] => 2025-02-26 12:17:05
    [RateCDR] => 1
)
  
[2025-02-26 12:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:17:05' and `end` < '2025-02-26 12:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:17:18] Production.INFO: count ==4621  
[2025-02-26 12:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:17:05 - End Time 2025-02-26 12:17:05  
[2025-02-26 12:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561716', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561716', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561716', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561716', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:17:20] Production.INFO: ProcessCDR(1,14561716,1,1,2)  
[2025-02-26 12:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:17:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:17:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561716', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561716', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:17:25] Production.INFO: ==1851== Releasing lock...  
[2025-02-26 12:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:17:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:18:06
    [end_date_ymd] => 2025-02-26 12:18:06
    [RateCDR] => 1
)
  
[2025-02-26 12:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:18:06' and `end` < '2025-02-26 12:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:18:18] Production.INFO: count ==4633  
[2025-02-26 12:18:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:18:06 - End Time 2025-02-26 12:18:06  
[2025-02-26 12:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561721', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561721', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:18:21] Production.INFO: ProcessCDR(1,14561721,1,1,2)  
[2025-02-26 12:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:18:26] Production.INFO: ==1933== Releasing lock...  
[2025-02-26 12:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:18:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:19:05
    [end_date_ymd] => 2025-02-26 12:19:05
    [RateCDR] => 1
)
  
[2025-02-26 12:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:19:05' and `end` < '2025-02-26 12:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:19:18] Production.INFO: count ==4631  
[2025-02-26 12:19:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:19:05 - End Time 2025-02-26 12:19:05  
[2025-02-26 12:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561726', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561726', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:19:20] Production.INFO: ProcessCDR(1,14561726,1,1,2)  
[2025-02-26 12:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:19:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:19:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:19:25] Production.INFO: ==2004== Releasing lock...  
[2025-02-26 12:19:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:19:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:20:06
    [end_date_ymd] => 2025-02-26 12:20:06
    [RateCDR] => 1
)
  
[2025-02-26 12:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:20:06' and `end` < '2025-02-26 12:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:20:19] Production.INFO: count ==4623  
[2025-02-26 12:20:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:20:06 - End Time 2025-02-26 12:20:06  
[2025-02-26 12:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561732', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561732', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:20:22] Production.INFO: ProcessCDR(1,14561732,1,1,2)  
[2025-02-26 12:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:20:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561732', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561732', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:20:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:20:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:20:27] Production.INFO: ==2079== Releasing lock...  
[2025-02-26 12:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:20:27] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:21:05
    [end_date_ymd] => 2025-02-26 12:21:05
    [RateCDR] => 1
)
  
[2025-02-26 12:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:21:05' and `end` < '2025-02-26 12:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:21:18] Production.INFO: count ==4631  
[2025-02-26 12:21:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:21:05 - End Time 2025-02-26 12:21:05  
[2025-02-26 12:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561737', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561737', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:21:20] Production.INFO: ProcessCDR(1,14561737,1,1,2)  
[2025-02-26 12:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:21:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561737', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561737', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:21:26] Production.INFO: ==2190== Releasing lock...  
[2025-02-26 12:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:21:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:22:06
    [end_date_ymd] => 2025-02-26 12:22:06
    [RateCDR] => 1
)
  
[2025-02-26 12:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:22:06' and `end` < '2025-02-26 12:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:22:19] Production.INFO: count ==4645  
[2025-02-26 12:22:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:22:06 - End Time 2025-02-26 12:22:06  
[2025-02-26 12:22:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561742', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561742', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561742', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561742', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:22:21] Production.INFO: ProcessCDR(1,14561742,1,1,2)  
[2025-02-26 12:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:22:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561742', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561742', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:22:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:22:26] Production.INFO: ==2267== Releasing lock...  
[2025-02-26 12:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:22:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:23:05
    [end_date_ymd] => 2025-02-26 12:23:05
    [RateCDR] => 1
)
  
[2025-02-26 12:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:23:05' and `end` < '2025-02-26 12:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:23:18] Production.INFO: count ==4648  
[2025-02-26 12:23:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:23:05 - End Time 2025-02-26 12:23:05  
[2025-02-26 12:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561747', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561747', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561747', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561747', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:23:20] Production.INFO: ProcessCDR(1,14561747,1,1,2)  
[2025-02-26 12:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561747', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561747', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:23:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:23:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:23:26] Production.INFO: ==2339== Releasing lock...  
[2025-02-26 12:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:23:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:24:06
    [end_date_ymd] => 2025-02-26 12:24:06
    [RateCDR] => 1
)
  
[2025-02-26 12:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:24:06' and `end` < '2025-02-26 12:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:24:19] Production.INFO: count ==4663  
[2025-02-26 12:24:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:24:06 - End Time 2025-02-26 12:24:06  
[2025-02-26 12:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561752', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561752', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:24:21] Production.INFO: ProcessCDR(1,14561752,1,1,2)  
[2025-02-26 12:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:24:26] Production.INFO: ==2410== Releasing lock...  
[2025-02-26 12:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:24:26] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:25:05
    [end_date_ymd] => 2025-02-26 12:25:05
    [RateCDR] => 1
)
  
[2025-02-26 12:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:25:05' and `end` < '2025-02-26 12:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:25:18] Production.INFO: count ==4658  
[2025-02-26 12:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:25:05 - End Time 2025-02-26 12:25:05  
[2025-02-26 12:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561757', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561757', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:25:20] Production.INFO: ProcessCDR(1,14561757,1,1,2)  
[2025-02-26 12:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:25:25] Production.INFO: ==2483== Releasing lock...  
[2025-02-26 12:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:25:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:26:06
    [end_date_ymd] => 2025-02-26 12:26:06
    [RateCDR] => 1
)
  
[2025-02-26 12:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:26:06' and `end` < '2025-02-26 12:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:26:19] Production.INFO: count ==4658  
[2025-02-26 12:26:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:26:06 - End Time 2025-02-26 12:26:06  
[2025-02-26 12:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561762', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561762', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561762', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561762', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:26:21] Production.INFO: ProcessCDR(1,14561762,1,1,2)  
[2025-02-26 12:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:26:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:26:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561762', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561762', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:26:26] Production.INFO: ==2557== Releasing lock...  
[2025-02-26 12:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:26:26] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:27:05
    [end_date_ymd] => 2025-02-26 12:27:05
    [RateCDR] => 1
)
  
[2025-02-26 12:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:27:05' and `end` < '2025-02-26 12:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:27:18] Production.INFO: count ==4645  
[2025-02-26 12:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:27:05 - End Time 2025-02-26 12:27:05  
[2025-02-26 12:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561767', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561767', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561767', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561767', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:27:20] Production.INFO: ProcessCDR(1,14561767,1,1,2)  
[2025-02-26 12:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:27:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:27:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:27:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561767', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561767', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:27:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:27:25] Production.INFO: ==2631== Releasing lock...  
[2025-02-26 12:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:27:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:28:06
    [end_date_ymd] => 2025-02-26 12:28:06
    [RateCDR] => 1
)
  
[2025-02-26 12:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:28:06' and `end` < '2025-02-26 12:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:28:18] Production.INFO: count ==4624  
[2025-02-26 12:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:28:06 - End Time 2025-02-26 12:28:06  
[2025-02-26 12:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561772', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561772', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:28:21] Production.INFO: ProcessCDR(1,14561772,1,1,2)  
[2025-02-26 12:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:28:26] Production.INFO: ==2703== Releasing lock...  
[2025-02-26 12:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:28:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:29:05
    [end_date_ymd] => 2025-02-26 12:29:05
    [RateCDR] => 1
)
  
[2025-02-26 12:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:29:05' and `end` < '2025-02-26 12:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:29:18] Production.INFO: count ==4633  
[2025-02-26 12:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:29:05 - End Time 2025-02-26 12:29:05  
[2025-02-26 12:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561777', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561777', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:29:20] Production.INFO: ProcessCDR(1,14561777,1,1,2)  
[2025-02-26 12:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:29:25] Production.INFO: ==2773== Releasing lock...  
[2025-02-26 12:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:29:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:30:06
    [end_date_ymd] => 2025-02-26 12:30:06
    [RateCDR] => 1
)
  
[2025-02-26 12:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:30:06' and `end` < '2025-02-26 12:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:30:19] Production.INFO: count ==4635  
[2025-02-26 12:30:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:30:06 - End Time 2025-02-26 12:30:06  
[2025-02-26 12:30:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561783', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561783', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:30:21] Production.INFO: ProcessCDR(1,14561783,1,1,2)  
[2025-02-26 12:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:30:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:30:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:30:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561783', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561783', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:30:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:30:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:30:26] Production.INFO: ==2849== Releasing lock...  
[2025-02-26 12:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:30:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:31:05
    [end_date_ymd] => 2025-02-26 12:31:05
    [RateCDR] => 1
)
  
[2025-02-26 12:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:31:05' and `end` < '2025-02-26 12:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:31:17] Production.INFO: count ==4617  
[2025-02-26 12:31:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:31:05 - End Time 2025-02-26 12:31:05  
[2025-02-26 12:31:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561788', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561788', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:31:19] Production.INFO: ProcessCDR(1,14561788,1,1,2)  
[2025-02-26 12:31:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:31:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:31:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:31:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:31:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561788', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:31:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561788', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:31:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:31:25] Production.INFO: ==2923== Releasing lock...  
[2025-02-26 12:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:31:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:32:06
    [end_date_ymd] => 2025-02-26 12:32:06
    [RateCDR] => 1
)
  
[2025-02-26 12:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:32:06' and `end` < '2025-02-26 12:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:32:19] Production.INFO: count ==4624  
[2025-02-26 12:32:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:32:06 - End Time 2025-02-26 12:32:06  
[2025-02-26 12:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561793', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561793', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:32:21] Production.INFO: ProcessCDR(1,14561793,1,1,2)  
[2025-02-26 12:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561793', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561793', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:32:26] Production.INFO: ==2997== Releasing lock...  
[2025-02-26 12:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:32:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:33:05
    [end_date_ymd] => 2025-02-26 12:33:05
    [RateCDR] => 1
)
  
[2025-02-26 12:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:33:05' and `end` < '2025-02-26 12:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:33:18] Production.INFO: count ==4637  
[2025-02-26 12:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:33:05 - End Time 2025-02-26 12:33:05  
[2025-02-26 12:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561798', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561798', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561798', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561798', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:33:20] Production.INFO: ProcessCDR(1,14561798,1,1,2)  
[2025-02-26 12:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561798', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561798', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:33:25] Production.INFO: ==3069== Releasing lock...  
[2025-02-26 12:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:33:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:34:05
    [end_date_ymd] => 2025-02-26 12:34:05
    [RateCDR] => 1
)
  
[2025-02-26 12:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:34:05' and `end` < '2025-02-26 12:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:34:18] Production.INFO: count ==4657  
[2025-02-26 12:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:34:05 - End Time 2025-02-26 12:34:05  
[2025-02-26 12:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561803', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561803', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561803', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561803', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:34:20] Production.INFO: ProcessCDR(1,14561803,1,1,2)  
[2025-02-26 12:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:34:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:34:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561803', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561803', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:34:25] Production.INFO: ==3145== Releasing lock...  
[2025-02-26 12:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:34:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:35:06
    [end_date_ymd] => 2025-02-26 12:35:06
    [RateCDR] => 1
)
  
[2025-02-26 12:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:35:06' and `end` < '2025-02-26 12:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:35:19] Production.INFO: count ==4656  
[2025-02-26 12:35:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:35:06 - End Time 2025-02-26 12:35:06  
[2025-02-26 12:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561808', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561808', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:35:21] Production.INFO: ProcessCDR(1,14561808,1,1,2)  
[2025-02-26 12:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:35:25] Production.INFO: ==3219== Releasing lock...  
[2025-02-26 12:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:35:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:36:05
    [end_date_ymd] => 2025-02-26 12:36:05
    [RateCDR] => 1
)
  
[2025-02-26 12:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:36:05' and `end` < '2025-02-26 12:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:36:18] Production.INFO: count ==4679  
[2025-02-26 12:36:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:36:05 - End Time 2025-02-26 12:36:05  
[2025-02-26 12:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561813', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561813', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561813', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561813', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:36:20] Production.INFO: ProcessCDR(1,14561813,1,1,2)  
[2025-02-26 12:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:36:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:36:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561813', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561813', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:36:25] Production.INFO: ==3298== Releasing lock...  
[2025-02-26 12:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:36:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:37:05
    [end_date_ymd] => 2025-02-26 12:37:05
    [RateCDR] => 1
)
  
[2025-02-26 12:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:37:05' and `end` < '2025-02-26 12:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:37:18] Production.INFO: count ==4667  
[2025-02-26 12:37:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:37:05 - End Time 2025-02-26 12:37:05  
[2025-02-26 12:37:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561818', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561818', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561818', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561818', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:37:20] Production.INFO: ProcessCDR(1,14561818,1,1,2)  
[2025-02-26 12:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:37:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561818', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561818', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:37:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:37:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:37:24] Production.INFO: ==3412== Releasing lock...  
[2025-02-26 12:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:37:24] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 12:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:38:05
    [end_date_ymd] => 2025-02-26 12:38:05
    [RateCDR] => 1
)
  
[2025-02-26 12:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:38:05' and `end` < '2025-02-26 12:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:38:18] Production.INFO: count ==4648  
[2025-02-26 12:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:38:05 - End Time 2025-02-26 12:38:05  
[2025-02-26 12:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561823', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561823', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:38:20] Production.INFO: ProcessCDR(1,14561823,1,1,2)  
[2025-02-26 12:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:38:25] Production.INFO: ==3483== Releasing lock...  
[2025-02-26 12:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:38:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:39:05
    [end_date_ymd] => 2025-02-26 12:39:05
    [RateCDR] => 1
)
  
[2025-02-26 12:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:39:05' and `end` < '2025-02-26 12:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:39:17] Production.INFO: count ==4621  
[2025-02-26 12:39:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:39:05 - End Time 2025-02-26 12:39:05  
[2025-02-26 12:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561828', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561828', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:39:20] Production.INFO: ProcessCDR(1,14561828,1,1,2)  
[2025-02-26 12:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:39:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:39:25] Production.INFO: ==3555== Releasing lock...  
[2025-02-26 12:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:39:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:40:06
    [end_date_ymd] => 2025-02-26 12:40:06
    [RateCDR] => 1
)
  
[2025-02-26 12:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:40:06' and `end` < '2025-02-26 12:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:40:18] Production.INFO: count ==4619  
[2025-02-26 12:40:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:40:06 - End Time 2025-02-26 12:40:06  
[2025-02-26 12:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561834', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561834', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:40:21] Production.INFO: ProcessCDR(1,14561834,1,1,2)  
[2025-02-26 12:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561834', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561834', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:40:26] Production.INFO: ==3630== Releasing lock...  
[2025-02-26 12:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:40:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:41:06
    [end_date_ymd] => 2025-02-26 12:41:06
    [RateCDR] => 1
)
  
[2025-02-26 12:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:41:06' and `end` < '2025-02-26 12:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:41:19] Production.INFO: count ==4609  
[2025-02-26 12:41:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:41:06 - End Time 2025-02-26 12:41:06  
[2025-02-26 12:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561839', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561839', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:41:21] Production.INFO: ProcessCDR(1,14561839,1,1,2)  
[2025-02-26 12:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561839', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561839', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:41:26] Production.INFO: ==3706== Releasing lock...  
[2025-02-26 12:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:41:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:42:05
    [end_date_ymd] => 2025-02-26 12:42:05
    [RateCDR] => 1
)
  
[2025-02-26 12:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:42:05' and `end` < '2025-02-26 12:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:42:18] Production.INFO: count ==4617  
[2025-02-26 12:42:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:42:05 - End Time 2025-02-26 12:42:05  
[2025-02-26 12:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561844', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561844', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561844', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561844', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:42:20] Production.INFO: ProcessCDR(1,14561844,1,1,2)  
[2025-02-26 12:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:42:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561844', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561844', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:42:25] Production.INFO: ==3776== Releasing lock...  
[2025-02-26 12:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:42:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:43:06
    [end_date_ymd] => 2025-02-26 12:43:06
    [RateCDR] => 1
)
  
[2025-02-26 12:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:43:06' and `end` < '2025-02-26 12:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:43:18] Production.INFO: count ==4609  
[2025-02-26 12:43:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:43:06 - End Time 2025-02-26 12:43:06  
[2025-02-26 12:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561849', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561849', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561849', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561849', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:43:21] Production.INFO: ProcessCDR(1,14561849,1,1,2)  
[2025-02-26 12:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:43:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:43:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:43:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561849', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561849', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:43:26] Production.INFO: ==3850== Releasing lock...  
[2025-02-26 12:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:43:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:44:06
    [end_date_ymd] => 2025-02-26 12:44:06
    [RateCDR] => 1
)
  
[2025-02-26 12:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:44:06' and `end` < '2025-02-26 12:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:44:18] Production.INFO: count ==4596  
[2025-02-26 12:44:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:44:06 - End Time 2025-02-26 12:44:06  
[2025-02-26 12:44:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561854', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561854', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:44:21] Production.INFO: ProcessCDR(1,14561854,1,1,2)  
[2025-02-26 12:44:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:44:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:44:26] Production.INFO: ==3922== Releasing lock...  
[2025-02-26 12:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:44:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:45:06
    [end_date_ymd] => 2025-02-26 12:45:06
    [RateCDR] => 1
)
  
[2025-02-26 12:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:45:06' and `end` < '2025-02-26 12:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:45:19] Production.INFO: count ==4581  
[2025-02-26 12:45:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:45:06 - End Time 2025-02-26 12:45:06  
[2025-02-26 12:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561859', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561859', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:45:21] Production.INFO: ProcessCDR(1,14561859,1,1,2)  
[2025-02-26 12:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:45:26] Production.INFO: ==3998== Releasing lock...  
[2025-02-26 12:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:45:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 12:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:46:06
    [end_date_ymd] => 2025-02-26 12:46:06
    [RateCDR] => 1
)
  
[2025-02-26 12:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:46:06' and `end` < '2025-02-26 12:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:46:18] Production.INFO: count ==4598  
[2025-02-26 12:46:21] Production.ERROR: pbx CDR StartTime 2025-02-26 09:46:06 - End Time 2025-02-26 12:46:06  
[2025-02-26 12:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561864', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561864', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561864', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561864', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:46:21] Production.INFO: ProcessCDR(1,14561864,1,1,2)  
[2025-02-26 12:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561864', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561864', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:46:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:46:27] Production.INFO: ==4068== Releasing lock...  
[2025-02-26 12:46:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:46:27] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:47:05
    [end_date_ymd] => 2025-02-26 12:47:05
    [RateCDR] => 1
)
  
[2025-02-26 12:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:47:05' and `end` < '2025-02-26 12:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:47:17] Production.INFO: count ==4602  
[2025-02-26 12:47:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:47:05 - End Time 2025-02-26 12:47:05  
[2025-02-26 12:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561869', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561869', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561869', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561869', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:47:20] Production.INFO: ProcessCDR(1,14561869,1,1,2)  
[2025-02-26 12:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:47:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:47:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:47:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561869', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561869', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:47:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:47:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:47:25] Production.INFO: ==4141== Releasing lock...  
[2025-02-26 12:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:47:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:48:05
    [end_date_ymd] => 2025-02-26 12:48:05
    [RateCDR] => 1
)
  
[2025-02-26 12:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:48:05' and `end` < '2025-02-26 12:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:48:18] Production.INFO: count ==4586  
[2025-02-26 12:48:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:48:05 - End Time 2025-02-26 12:48:05  
[2025-02-26 12:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561874', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561874', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:48:20] Production.INFO: ProcessCDR(1,14561874,1,1,2)  
[2025-02-26 12:48:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:48:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:48:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:48:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:48:25] Production.INFO: ==4216== Releasing lock...  
[2025-02-26 12:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:48:25] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 12:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:49:06
    [end_date_ymd] => 2025-02-26 12:49:06
    [RateCDR] => 1
)
  
[2025-02-26 12:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:49:06' and `end` < '2025-02-26 12:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:49:18] Production.INFO: count ==4585  
[2025-02-26 12:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:49:06 - End Time 2025-02-26 12:49:06  
[2025-02-26 12:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561879', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561879', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:49:21] Production.INFO: ProcessCDR(1,14561879,1,1,2)  
[2025-02-26 12:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:49:26] Production.INFO: ==4293== Releasing lock...  
[2025-02-26 12:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:49:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 12:50:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:50:05
    [end_date_ymd] => 2025-02-26 12:50:05
    [RateCDR] => 1
)
  
[2025-02-26 12:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:50:05' and `end` < '2025-02-26 12:50:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:50:18] Production.INFO: count ==4587  
[2025-02-26 12:50:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:50:05 - End Time 2025-02-26 12:50:05  
[2025-02-26 12:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561885', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561885', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:50:21] Production.INFO: ProcessCDR(1,14561885,1,1,2)  
[2025-02-26 12:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561885', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561885', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:50:26] Production.INFO: ==4368== Releasing lock...  
[2025-02-26 12:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:50:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 12:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:51:06
    [end_date_ymd] => 2025-02-26 12:51:06
    [RateCDR] => 1
)
  
[2025-02-26 12:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:51:06' and `end` < '2025-02-26 12:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:51:18] Production.INFO: count ==4626  
[2025-02-26 12:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:51:06 - End Time 2025-02-26 12:51:06  
[2025-02-26 12:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561890', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561890', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:51:20] Production.INFO: ProcessCDR(1,14561890,1,1,2)  
[2025-02-26 12:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561890', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561890', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:51:25] Production.INFO: ==4441== Releasing lock...  
[2025-02-26 12:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:51:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:52:05
    [end_date_ymd] => 2025-02-26 12:52:05
    [RateCDR] => 1
)
  
[2025-02-26 12:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:52:05' and `end` < '2025-02-26 12:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:52:18] Production.INFO: count ==4644  
[2025-02-26 12:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:52:05 - End Time 2025-02-26 12:52:05  
[2025-02-26 12:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561895', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561895', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561895', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561895', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:52:20] Production.INFO: ProcessCDR(1,14561895,1,1,2)  
[2025-02-26 12:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561895', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561895', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:52:25] Production.INFO: ==4552== Releasing lock...  
[2025-02-26 12:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:52:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:53:05
    [end_date_ymd] => 2025-02-26 12:53:05
    [RateCDR] => 1
)
  
[2025-02-26 12:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:53:05' and `end` < '2025-02-26 12:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:53:18] Production.INFO: count ==4643  
[2025-02-26 12:53:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:53:05 - End Time 2025-02-26 12:53:05  
[2025-02-26 12:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561900', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561900', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561900', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561900', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:53:20] Production.INFO: ProcessCDR(1,14561900,1,1,2)  
[2025-02-26 12:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561900', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561900', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:53:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:53:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:53:25] Production.INFO: ==4637== Releasing lock...  
[2025-02-26 12:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:53:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:54:05
    [end_date_ymd] => 2025-02-26 12:54:05
    [RateCDR] => 1
)
  
[2025-02-26 12:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:54:05' and `end` < '2025-02-26 12:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:54:17] Production.INFO: count ==4635  
[2025-02-26 12:54:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:54:05 - End Time 2025-02-26 12:54:05  
[2025-02-26 12:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561905', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561905', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:54:20] Production.INFO: ProcessCDR(1,14561905,1,1,2)  
[2025-02-26 12:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:54:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:54:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:54:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:54:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:54:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:54:23] Production.INFO: ==4709== Releasing lock...  
[2025-02-26 12:54:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:54:23] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 12:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:55:05
    [end_date_ymd] => 2025-02-26 12:55:05
    [RateCDR] => 1
)
  
[2025-02-26 12:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:55:05' and `end` < '2025-02-26 12:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:55:18] Production.INFO: count ==4615  
[2025-02-26 12:55:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:55:05 - End Time 2025-02-26 12:55:05  
[2025-02-26 12:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561910', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561910', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:55:20] Production.INFO: ProcessCDR(1,14561910,1,1,2)  
[2025-02-26 12:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:55:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:55:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:55:25] Production.INFO: ==4792== Releasing lock...  
[2025-02-26 12:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:55:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:56:05
    [end_date_ymd] => 2025-02-26 12:56:05
    [RateCDR] => 1
)
  
[2025-02-26 12:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:56:05' and `end` < '2025-02-26 12:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:56:18] Production.INFO: count ==4608  
[2025-02-26 12:56:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:56:05 - End Time 2025-02-26 12:56:05  
[2025-02-26 12:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561915', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561915', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561915', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561915', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:56:20] Production.INFO: ProcessCDR(1,14561915,1,1,2)  
[2025-02-26 12:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561915', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561915', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:56:25] Production.INFO: ==4866== Releasing lock...  
[2025-02-26 12:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:56:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:57:05
    [end_date_ymd] => 2025-02-26 12:57:05
    [RateCDR] => 1
)
  
[2025-02-26 12:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:57:05' and `end` < '2025-02-26 12:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:57:18] Production.INFO: count ==4597  
[2025-02-26 12:57:20] Production.ERROR: pbx CDR StartTime 2025-02-26 09:57:05 - End Time 2025-02-26 12:57:05  
[2025-02-26 12:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561920', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561920', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561920', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561920', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:57:20] Production.INFO: ProcessCDR(1,14561920,1,1,2)  
[2025-02-26 12:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561920', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561920', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:57:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:57:26] Production.INFO: ==4939== Releasing lock...  
[2025-02-26 12:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:57:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:58:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:58:04
    [end_date_ymd] => 2025-02-26 12:58:04
    [RateCDR] => 1
)
  
[2025-02-26 12:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:58:04' and `end` < '2025-02-26 12:58:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:58:17] Production.INFO: count ==4593  
[2025-02-26 12:58:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:58:04 - End Time 2025-02-26 12:58:04  
[2025-02-26 12:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561925', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561925', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:58:19] Production.INFO: ProcessCDR(1,14561925,1,1,2)  
[2025-02-26 12:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:58:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:58:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:58:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:58:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:58:24] Production.INFO: ==5011== Releasing lock...  
[2025-02-26 12:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:58:24] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 12:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 09:59:05
    [end_date_ymd] => 2025-02-26 12:59:05
    [RateCDR] => 1
)
  
[2025-02-26 12:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 09:59:05' and `end` < '2025-02-26 12:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 12:59:18] Production.INFO: count ==4572  
[2025-02-26 12:59:19] Production.ERROR: pbx CDR StartTime 2025-02-26 09:59:05 - End Time 2025-02-26 12:59:05  
[2025-02-26 12:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 12:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561930', 'tblTempVendorCDR_20' ) start  
[2025-02-26 12:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561930', 'tblTempVendorCDR_20' ) end  
[2025-02-26 12:59:20] Production.INFO: ProcessCDR(1,14561930,1,1,2)  
[2025-02-26 12:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:59:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 12:59:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 12:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 12:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 12:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 12:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 12:59:24] Production.INFO: ==5083== Releasing lock...  
[2025-02-26 12:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 12:59:24] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 13:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:00:06
    [end_date_ymd] => 2025-02-26 13:00:06
    [RateCDR] => 1
)
  
[2025-02-26 13:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:00:06' and `end` < '2025-02-26 13:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:00:20] Production.INFO: count ==4565  
[2025-02-26 13:00:22] Production.ERROR: pbx CDR StartTime 2025-02-26 10:00:06 - End Time 2025-02-26 13:00:06  
[2025-02-26 13:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561936', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561936', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:00:23] Production.INFO: ProcessCDR(1,14561936,1,1,2)  
[2025-02-26 13:00:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:00:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561936', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561936', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:00:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:00:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:00:28] Production.INFO: ==5158== Releasing lock...  
[2025-02-26 13:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:00:28] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 13:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:01:05
    [end_date_ymd] => 2025-02-26 13:01:05
    [RateCDR] => 1
)
  
[2025-02-26 13:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:01:05' and `end` < '2025-02-26 13:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:01:22] Production.INFO: count ==4550  
[2025-02-26 13:01:24] Production.ERROR: pbx CDR StartTime 2025-02-26 10:01:05 - End Time 2025-02-26 13:01:05  
[2025-02-26 13:01:24] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:01:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:01:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:01:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561941', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:01:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561941', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:01:24] Production.INFO: ProcessCDR(1,14561941,1,1,2)  
[2025-02-26 13:01:24] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:01:27] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:01:27] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:01:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:01:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561941', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:01:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561941', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:01:29] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:01:30] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:01:30] Production.INFO: ==5247== Releasing lock...  
[2025-02-26 13:01:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:01:30] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 13:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:02:06
    [end_date_ymd] => 2025-02-26 13:02:06
    [RateCDR] => 1
)
  
[2025-02-26 13:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:02:06' and `end` < '2025-02-26 13:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:02:19] Production.INFO: count ==4538  
[2025-02-26 13:02:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:02:06 - End Time 2025-02-26 13:02:06  
[2025-02-26 13:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561946', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561946', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561946', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561946', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:02:21] Production.INFO: ProcessCDR(1,14561946,1,1,2)  
[2025-02-26 13:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561946', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561946', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:02:26] Production.INFO: ==5322== Releasing lock...  
[2025-02-26 13:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:02:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 13:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:03:06
    [end_date_ymd] => 2025-02-26 13:03:06
    [RateCDR] => 1
)
  
[2025-02-26 13:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:03:06' and `end` < '2025-02-26 13:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:03:19] Production.INFO: count ==4539  
[2025-02-26 13:03:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:03:06 - End Time 2025-02-26 13:03:06  
[2025-02-26 13:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561951', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561951', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561951', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561951', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:03:21] Production.INFO: ProcessCDR(1,14561951,1,1,2)  
[2025-02-26 13:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:03:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561951', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561951', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:03:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:03:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:03:27] Production.INFO: ==5392== Releasing lock...  
[2025-02-26 13:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:03:27] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 13:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:04:06
    [end_date_ymd] => 2025-02-26 13:04:06
    [RateCDR] => 1
)
  
[2025-02-26 13:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:04:06' and `end` < '2025-02-26 13:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:04:19] Production.INFO: count ==4526  
[2025-02-26 13:04:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:04:06 - End Time 2025-02-26 13:04:06  
[2025-02-26 13:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561956', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561956', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:04:21] Production.INFO: ProcessCDR(1,14561956,1,1,2)  
[2025-02-26 13:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:04:27] Production.INFO: ==5464== Releasing lock...  
[2025-02-26 13:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:04:27] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 13:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:05:05
    [end_date_ymd] => 2025-02-26 13:05:05
    [RateCDR] => 1
)
  
[2025-02-26 13:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:05:05' and `end` < '2025-02-26 13:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:05:18] Production.INFO: count ==4518  
[2025-02-26 13:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:05:05 - End Time 2025-02-26 13:05:05  
[2025-02-26 13:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561961', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561961', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:05:20] Production.INFO: ProcessCDR(1,14561961,1,1,2)  
[2025-02-26 13:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:05:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:05:26] Production.INFO: ==5534== Releasing lock...  
[2025-02-26 13:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:05:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:06:05
    [end_date_ymd] => 2025-02-26 13:06:05
    [RateCDR] => 1
)
  
[2025-02-26 13:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:06:05' and `end` < '2025-02-26 13:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:06:18] Production.INFO: count ==4511  
[2025-02-26 13:06:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:06:05 - End Time 2025-02-26 13:06:05  
[2025-02-26 13:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561966', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561966', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:06:20] Production.INFO: ProcessCDR(1,14561966,1,1,2)  
[2025-02-26 13:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:06:26] Production.INFO: ==5605== Releasing lock...  
[2025-02-26 13:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:06:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:07:05
    [end_date_ymd] => 2025-02-26 13:07:05
    [RateCDR] => 1
)
  
[2025-02-26 13:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:07:05' and `end` < '2025-02-26 13:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:07:18] Production.INFO: count ==4506  
[2025-02-26 13:07:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:07:05 - End Time 2025-02-26 13:07:05  
[2025-02-26 13:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561971', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561971', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:07:21] Production.INFO: ProcessCDR(1,14561971,1,1,2)  
[2025-02-26 13:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:07:26] Production.INFO: ==5716== Releasing lock...  
[2025-02-26 13:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:07:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:08:05
    [end_date_ymd] => 2025-02-26 13:08:05
    [RateCDR] => 1
)
  
[2025-02-26 13:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:08:05' and `end` < '2025-02-26 13:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:08:18] Production.INFO: count ==4511  
[2025-02-26 13:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:08:05 - End Time 2025-02-26 13:08:05  
[2025-02-26 13:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561976', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561976', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:08:20] Production.INFO: ProcessCDR(1,14561976,1,1,2)  
[2025-02-26 13:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:08:25] Production.INFO: ==5787== Releasing lock...  
[2025-02-26 13:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:08:25] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:09:05
    [end_date_ymd] => 2025-02-26 13:09:05
    [RateCDR] => 1
)
  
[2025-02-26 13:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:09:05' and `end` < '2025-02-26 13:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:09:18] Production.INFO: count ==4517  
[2025-02-26 13:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:09:05 - End Time 2025-02-26 13:09:05  
[2025-02-26 13:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561981', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561981', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:09:20] Production.INFO: ProcessCDR(1,14561981,1,1,2)  
[2025-02-26 13:09:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:09:26] Production.INFO: ==5859== Releasing lock...  
[2025-02-26 13:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:09:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:10:06
    [end_date_ymd] => 2025-02-26 13:10:06
    [RateCDR] => 1
)
  
[2025-02-26 13:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:10:06' and `end` < '2025-02-26 13:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:10:19] Production.INFO: count ==4533  
[2025-02-26 13:10:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:10:06 - End Time 2025-02-26 13:10:06  
[2025-02-26 13:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561987', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561987', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:10:21] Production.INFO: ProcessCDR(1,14561987,1,1,2)  
[2025-02-26 13:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:10:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561987', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561987', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:10:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:10:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:10:27] Production.INFO: ==5934== Releasing lock...  
[2025-02-26 13:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:10:27] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 13:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:11:06
    [end_date_ymd] => 2025-02-26 13:11:06
    [RateCDR] => 1
)
  
[2025-02-26 13:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:11:06' and `end` < '2025-02-26 13:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:11:19] Production.INFO: count ==4497  
[2025-02-26 13:11:22] Production.ERROR: pbx CDR StartTime 2025-02-26 10:11:06 - End Time 2025-02-26 13:11:06  
[2025-02-26 13:11:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561992', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561992', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:11:22] Production.INFO: ProcessCDR(1,14561992,1,1,2)  
[2025-02-26 13:11:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:11:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:11:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:11:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:11:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561992', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:11:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561992', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:11:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:11:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:11:28] Production.INFO: ==6008== Releasing lock...  
[2025-02-26 13:11:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:11:28] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:12:05
    [end_date_ymd] => 2025-02-26 13:12:05
    [RateCDR] => 1
)
  
[2025-02-26 13:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:12:05' and `end` < '2025-02-26 13:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:12:18] Production.INFO: count ==4492  
[2025-02-26 13:12:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:12:05 - End Time 2025-02-26 13:12:05  
[2025-02-26 13:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561997', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14561997', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561997', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14561997', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:12:20] Production.INFO: ProcessCDR(1,14561997,1,1,2)  
[2025-02-26 13:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14561997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14561997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14561997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:12:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14561997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561997', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14561997', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:12:26] Production.INFO: ==6079== Releasing lock...  
[2025-02-26 13:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:12:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:13:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:13:06
    [end_date_ymd] => 2025-02-26 13:13:06
    [RateCDR] => 1
)
  
[2025-02-26 13:13:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:13:06' and `end` < '2025-02-26 13:13:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:13:19] Production.INFO: count ==4503  
[2025-02-26 13:13:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:13:06 - End Time 2025-02-26 13:13:06  
[2025-02-26 13:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562002', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562002', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562002', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562002', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:13:21] Production.INFO: ProcessCDR(1,14562002,1,1,2)  
[2025-02-26 13:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:13:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:13:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562002', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562002', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:13:26] Production.INFO: ==6156== Releasing lock...  
[2025-02-26 13:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:13:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:14:06
    [end_date_ymd] => 2025-02-26 13:14:06
    [RateCDR] => 1
)
  
[2025-02-26 13:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:14:06' and `end` < '2025-02-26 13:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:14:19] Production.INFO: count ==4511  
[2025-02-26 13:14:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:14:06 - End Time 2025-02-26 13:14:06  
[2025-02-26 13:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562007', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562007', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:14:21] Production.INFO: ProcessCDR(1,14562007,1,1,2)  
[2025-02-26 13:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:14:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:14:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:14:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:14:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:14:27] Production.INFO: ==6237== Releasing lock...  
[2025-02-26 13:14:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:14:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:15:06
    [end_date_ymd] => 2025-02-26 13:15:06
    [RateCDR] => 1
)
  
[2025-02-26 13:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:15:06' and `end` < '2025-02-26 13:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:15:19] Production.INFO: count ==4510  
[2025-02-26 13:15:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:15:06 - End Time 2025-02-26 13:15:06  
[2025-02-26 13:15:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562012', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562012', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:15:21] Production.INFO: ProcessCDR(1,14562012,1,1,2)  
[2025-02-26 13:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:15:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:15:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:15:25] Production.INFO: ==6310== Releasing lock...  
[2025-02-26 13:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:15:25] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:16:05
    [end_date_ymd] => 2025-02-26 13:16:05
    [RateCDR] => 1
)
  
[2025-02-26 13:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:16:05' and `end` < '2025-02-26 13:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:16:18] Production.INFO: count ==4520  
[2025-02-26 13:16:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:16:05 - End Time 2025-02-26 13:16:05  
[2025-02-26 13:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562017', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562017', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:16:21] Production.INFO: ProcessCDR(1,14562017,1,1,2)  
[2025-02-26 13:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:16:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:16:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:16:26] Production.INFO: ==6380== Releasing lock...  
[2025-02-26 13:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:16:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:17:06
    [end_date_ymd] => 2025-02-26 13:17:06
    [RateCDR] => 1
)
  
[2025-02-26 13:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:17:06' and `end` < '2025-02-26 13:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:17:19] Production.INFO: count ==4513  
[2025-02-26 13:17:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:17:06 - End Time 2025-02-26 13:17:06  
[2025-02-26 13:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562022', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562022', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:17:21] Production.INFO: ProcessCDR(1,14562022,1,1,2)  
[2025-02-26 13:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:17:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:17:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:17:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:17:27] Production.INFO: ==6453== Releasing lock...  
[2025-02-26 13:17:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:17:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:18:05
    [end_date_ymd] => 2025-02-26 13:18:05
    [RateCDR] => 1
)
  
[2025-02-26 13:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:18:05' and `end` < '2025-02-26 13:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:18:19] Production.INFO: count ==4496  
[2025-02-26 13:18:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:18:05 - End Time 2025-02-26 13:18:05  
[2025-02-26 13:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562027', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562027', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:18:21] Production.INFO: ProcessCDR(1,14562027,1,1,2)  
[2025-02-26 13:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:18:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:18:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:18:26] Production.INFO: ==6522== Releasing lock...  
[2025-02-26 13:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:18:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:19:06
    [end_date_ymd] => 2025-02-26 13:19:06
    [RateCDR] => 1
)
  
[2025-02-26 13:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:19:06' and `end` < '2025-02-26 13:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:19:19] Production.INFO: count ==4492  
[2025-02-26 13:19:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:19:06 - End Time 2025-02-26 13:19:06  
[2025-02-26 13:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562032', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562032', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:19:21] Production.INFO: ProcessCDR(1,14562032,1,1,2)  
[2025-02-26 13:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:19:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:19:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:19:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:19:27] Production.INFO: ==6593== Releasing lock...  
[2025-02-26 13:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:19:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:20:06
    [end_date_ymd] => 2025-02-26 13:20:06
    [RateCDR] => 1
)
  
[2025-02-26 13:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:20:06' and `end` < '2025-02-26 13:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:20:19] Production.INFO: count ==4489  
[2025-02-26 13:20:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:20:06 - End Time 2025-02-26 13:20:06  
[2025-02-26 13:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562038', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562038', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:20:22] Production.INFO: ProcessCDR(1,14562038,1,1,2)  
[2025-02-26 13:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:20:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562038', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562038', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:20:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:20:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:20:27] Production.INFO: ==6667== Releasing lock...  
[2025-02-26 13:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:20:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 13:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:21:06
    [end_date_ymd] => 2025-02-26 13:21:06
    [RateCDR] => 1
)
  
[2025-02-26 13:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:21:06' and `end` < '2025-02-26 13:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:21:19] Production.INFO: count ==4462  
[2025-02-26 13:21:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:21:06 - End Time 2025-02-26 13:21:06  
[2025-02-26 13:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562043', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562043', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:21:21] Production.INFO: ProcessCDR(1,14562043,1,1,2)  
[2025-02-26 13:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:21:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562043', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562043', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:21:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:21:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:21:27] Production.INFO: ==6745== Releasing lock...  
[2025-02-26 13:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:21:27] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 13:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:22:05
    [end_date_ymd] => 2025-02-26 13:22:05
    [RateCDR] => 1
)
  
[2025-02-26 13:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:22:05' and `end` < '2025-02-26 13:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:22:18] Production.INFO: count ==4433  
[2025-02-26 13:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:22:05 - End Time 2025-02-26 13:22:05  
[2025-02-26 13:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562048', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562048', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562048', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562048', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:22:20] Production.INFO: ProcessCDR(1,14562048,1,1,2)  
[2025-02-26 13:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:22:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562048', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562048', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:22:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:22:26] Production.INFO: ==6821== Releasing lock...  
[2025-02-26 13:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:22:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 13:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:23:06
    [end_date_ymd] => 2025-02-26 13:23:06
    [RateCDR] => 1
)
  
[2025-02-26 13:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:23:06' and `end` < '2025-02-26 13:23:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:23:19] Production.INFO: count ==4429  
[2025-02-26 13:23:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:23:06 - End Time 2025-02-26 13:23:06  
[2025-02-26 13:23:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562053', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562053', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562053', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562053', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:23:21] Production.INFO: ProcessCDR(1,14562053,1,1,2)  
[2025-02-26 13:23:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:23:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:23:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:23:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562053', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562053', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:23:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:23:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:23:26] Production.INFO: ==6937== Releasing lock...  
[2025-02-26 13:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:23:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 13:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:24:05
    [end_date_ymd] => 2025-02-26 13:24:05
    [RateCDR] => 1
)
  
[2025-02-26 13:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:24:05' and `end` < '2025-02-26 13:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:24:18] Production.INFO: count ==4438  
[2025-02-26 13:24:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:24:05 - End Time 2025-02-26 13:24:05  
[2025-02-26 13:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562058', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562058', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:24:21] Production.INFO: ProcessCDR(1,14562058,1,1,2)  
[2025-02-26 13:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:24:26] Production.INFO: ==7009== Releasing lock...  
[2025-02-26 13:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:24:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 13:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:25:06
    [end_date_ymd] => 2025-02-26 13:25:06
    [RateCDR] => 1
)
  
[2025-02-26 13:25:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:25:06' and `end` < '2025-02-26 13:25:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:25:19] Production.INFO: count ==4425  
[2025-02-26 13:25:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:25:06 - End Time 2025-02-26 13:25:06  
[2025-02-26 13:25:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562063', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562063', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:25:21] Production.INFO: ProcessCDR(1,14562063,1,1,2)  
[2025-02-26 13:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:25:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:25:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:25:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:25:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:25:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:25:27] Production.INFO: ==7085== Releasing lock...  
[2025-02-26 13:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:25:27] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 13:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:26:05
    [end_date_ymd] => 2025-02-26 13:26:05
    [RateCDR] => 1
)
  
[2025-02-26 13:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:26:05' and `end` < '2025-02-26 13:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:26:18] Production.INFO: count ==4420  
[2025-02-26 13:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:26:05 - End Time 2025-02-26 13:26:05  
[2025-02-26 13:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562068', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562068', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:26:20] Production.INFO: ProcessCDR(1,14562068,1,1,2)  
[2025-02-26 13:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:26:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:26:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:26:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:26:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:26:25] Production.INFO: ==7163== Releasing lock...  
[2025-02-26 13:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:26:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 13:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:27:06
    [end_date_ymd] => 2025-02-26 13:27:06
    [RateCDR] => 1
)
  
[2025-02-26 13:27:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:27:06' and `end` < '2025-02-26 13:27:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:27:18] Production.INFO: count ==4403  
[2025-02-26 13:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:27:06 - End Time 2025-02-26 13:27:06  
[2025-02-26 13:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562073', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562073', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:27:20] Production.INFO: ProcessCDR(1,14562073,1,1,2)  
[2025-02-26 13:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:27:25] Production.INFO: ==7243== Releasing lock...  
[2025-02-26 13:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:27:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 13:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:28:05
    [end_date_ymd] => 2025-02-26 13:28:05
    [RateCDR] => 1
)
  
[2025-02-26 13:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:28:05' and `end` < '2025-02-26 13:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:28:18] Production.INFO: count ==4394  
[2025-02-26 13:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:28:05 - End Time 2025-02-26 13:28:05  
[2025-02-26 13:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562078', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562078', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:28:20] Production.INFO: ProcessCDR(1,14562078,1,1,2)  
[2025-02-26 13:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:28:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:28:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:28:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:28:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:28:25] Production.INFO: ==7320== Releasing lock...  
[2025-02-26 13:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:28:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 13:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:29:06
    [end_date_ymd] => 2025-02-26 13:29:06
    [RateCDR] => 1
)
  
[2025-02-26 13:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:29:06' and `end` < '2025-02-26 13:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:29:18] Production.INFO: count ==4390  
[2025-02-26 13:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:29:06 - End Time 2025-02-26 13:29:06  
[2025-02-26 13:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562083', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562083', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:29:21] Production.INFO: ProcessCDR(1,14562083,1,1,2)  
[2025-02-26 13:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:29:26] Production.INFO: ==7398== Releasing lock...  
[2025-02-26 13:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:29:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 13:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:30:06
    [end_date_ymd] => 2025-02-26 13:30:06
    [RateCDR] => 1
)
  
[2025-02-26 13:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:30:06' and `end` < '2025-02-26 13:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:30:19] Production.INFO: count ==4394  
[2025-02-26 13:30:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:30:06 - End Time 2025-02-26 13:30:06  
[2025-02-26 13:30:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562089', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562089', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:30:21] Production.INFO: ProcessCDR(1,14562089,1,1,2)  
[2025-02-26 13:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:30:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:30:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:30:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562089', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562089', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:30:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:30:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:30:26] Production.INFO: ==7473== Releasing lock...  
[2025-02-26 13:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:30:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 13:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:31:05
    [end_date_ymd] => 2025-02-26 13:31:05
    [RateCDR] => 1
)
  
[2025-02-26 13:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:31:05' and `end` < '2025-02-26 13:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:31:18] Production.INFO: count ==4386  
[2025-02-26 13:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:31:05 - End Time 2025-02-26 13:31:05  
[2025-02-26 13:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562094', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562094', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:31:20] Production.INFO: ProcessCDR(1,14562094,1,1,2)  
[2025-02-26 13:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562094', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562094', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:31:26] Production.INFO: ==7550== Releasing lock...  
[2025-02-26 13:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:31:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 13:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:32:05
    [end_date_ymd] => 2025-02-26 13:32:05
    [RateCDR] => 1
)
  
[2025-02-26 13:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:32:05' and `end` < '2025-02-26 13:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:32:18] Production.INFO: count ==4350  
[2025-02-26 13:32:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:32:05 - End Time 2025-02-26 13:32:05  
[2025-02-26 13:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562099', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562099', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562099', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562099', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:32:20] Production.INFO: ProcessCDR(1,14562099,1,1,2)  
[2025-02-26 13:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:32:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:32:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562099', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562099', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:32:25] Production.INFO: ==7625== Releasing lock...  
[2025-02-26 13:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:32:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:33:05
    [end_date_ymd] => 2025-02-26 13:33:05
    [RateCDR] => 1
)
  
[2025-02-26 13:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:33:05' and `end` < '2025-02-26 13:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:33:18] Production.INFO: count ==4334  
[2025-02-26 13:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:33:05 - End Time 2025-02-26 13:33:05  
[2025-02-26 13:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562104', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562104', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562104', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562104', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:33:20] Production.INFO: ProcessCDR(1,14562104,1,1,2)  
[2025-02-26 13:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562104', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562104', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:33:25] Production.INFO: ==7697== Releasing lock...  
[2025-02-26 13:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:33:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:34:05
    [end_date_ymd] => 2025-02-26 13:34:05
    [RateCDR] => 1
)
  
[2025-02-26 13:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:34:05' and `end` < '2025-02-26 13:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:34:18] Production.INFO: count ==4336  
[2025-02-26 13:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:34:05 - End Time 2025-02-26 13:34:05  
[2025-02-26 13:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562109', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562109', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:34:20] Production.INFO: ProcessCDR(1,14562109,1,1,2)  
[2025-02-26 13:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:34:25] Production.INFO: ==7778== Releasing lock...  
[2025-02-26 13:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:34:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:35:05
    [end_date_ymd] => 2025-02-26 13:35:05
    [RateCDR] => 1
)
  
[2025-02-26 13:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:35:05' and `end` < '2025-02-26 13:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:35:18] Production.INFO: count ==4326  
[2025-02-26 13:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:35:05 - End Time 2025-02-26 13:35:05  
[2025-02-26 13:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562114', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562114', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:35:20] Production.INFO: ProcessCDR(1,14562114,1,1,2)  
[2025-02-26 13:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:35:26] Production.INFO: ==7855== Releasing lock...  
[2025-02-26 13:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:35:26] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:36:05
    [end_date_ymd] => 2025-02-26 13:36:05
    [RateCDR] => 1
)
  
[2025-02-26 13:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:36:05' and `end` < '2025-02-26 13:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:36:18] Production.INFO: count ==4325  
[2025-02-26 13:36:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:36:05 - End Time 2025-02-26 13:36:05  
[2025-02-26 13:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562119', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562119', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:36:20] Production.INFO: ProcessCDR(1,14562119,1,1,2)  
[2025-02-26 13:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:36:25] Production.INFO: ==7930== Releasing lock...  
[2025-02-26 13:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:36:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:37:05
    [end_date_ymd] => 2025-02-26 13:37:05
    [RateCDR] => 1
)
  
[2025-02-26 13:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:37:05' and `end` < '2025-02-26 13:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:37:18] Production.INFO: count ==4338  
[2025-02-26 13:37:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:37:05 - End Time 2025-02-26 13:37:05  
[2025-02-26 13:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562124', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562124', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:37:20] Production.INFO: ProcessCDR(1,14562124,1,1,2)  
[2025-02-26 13:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:37:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:37:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:37:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:37:25] Production.INFO: ==8009== Releasing lock...  
[2025-02-26 13:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:37:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:38:05
    [end_date_ymd] => 2025-02-26 13:38:05
    [RateCDR] => 1
)
  
[2025-02-26 13:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:38:05' and `end` < '2025-02-26 13:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:38:18] Production.INFO: count ==4349  
[2025-02-26 13:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:38:05 - End Time 2025-02-26 13:38:05  
[2025-02-26 13:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562129', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562129', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:38:20] Production.INFO: ProcessCDR(1,14562129,1,1,2)  
[2025-02-26 13:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:38:25] Production.INFO: ==8125== Releasing lock...  
[2025-02-26 13:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:38:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:39:05
    [end_date_ymd] => 2025-02-26 13:39:05
    [RateCDR] => 1
)
  
[2025-02-26 13:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:39:05' and `end` < '2025-02-26 13:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:39:18] Production.INFO: count ==4362  
[2025-02-26 13:39:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:39:05 - End Time 2025-02-26 13:39:05  
[2025-02-26 13:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562134', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562134', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:39:20] Production.INFO: ProcessCDR(1,14562134,1,1,2)  
[2025-02-26 13:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:39:26] Production.INFO: ==8202== Releasing lock...  
[2025-02-26 13:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:39:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 13:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:40:05
    [end_date_ymd] => 2025-02-26 13:40:05
    [RateCDR] => 1
)
  
[2025-02-26 13:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:40:05' and `end` < '2025-02-26 13:40:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:40:18] Production.INFO: count ==4358  
[2025-02-26 13:40:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:40:05 - End Time 2025-02-26 13:40:05  
[2025-02-26 13:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562140', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562140', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562140', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562140', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:40:20] Production.INFO: ProcessCDR(1,14562140,1,1,2)  
[2025-02-26 13:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562140', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562140', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:40:26] Production.INFO: ==8285== Releasing lock...  
[2025-02-26 13:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:40:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 13:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:41:06
    [end_date_ymd] => 2025-02-26 13:41:06
    [RateCDR] => 1
)
  
[2025-02-26 13:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:41:06' and `end` < '2025-02-26 13:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:41:18] Production.INFO: count ==4366  
[2025-02-26 13:41:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:41:06 - End Time 2025-02-26 13:41:06  
[2025-02-26 13:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562145', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562145', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:41:20] Production.INFO: ProcessCDR(1,14562145,1,1,2)  
[2025-02-26 13:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562145', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562145', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:41:26] Production.INFO: ==8364== Releasing lock...  
[2025-02-26 13:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:41:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 13:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:42:06
    [end_date_ymd] => 2025-02-26 13:42:06
    [RateCDR] => 1
)
  
[2025-02-26 13:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:42:06' and `end` < '2025-02-26 13:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:42:19] Production.INFO: count ==4343  
[2025-02-26 13:42:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:42:06 - End Time 2025-02-26 13:42:06  
[2025-02-26 13:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562150', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562150', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562150', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562150', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:42:21] Production.INFO: ProcessCDR(1,14562150,1,1,2)  
[2025-02-26 13:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:42:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:42:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562150', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562150', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:42:26] Production.INFO: ==8443== Releasing lock...  
[2025-02-26 13:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:42:26] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:43:05
    [end_date_ymd] => 2025-02-26 13:43:05
    [RateCDR] => 1
)
  
[2025-02-26 13:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:43:05' and `end` < '2025-02-26 13:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:43:18] Production.INFO: count ==4339  
[2025-02-26 13:43:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:43:05 - End Time 2025-02-26 13:43:05  
[2025-02-26 13:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562155', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562155', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562155', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562155', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:43:20] Production.INFO: ProcessCDR(1,14562155,1,1,2)  
[2025-02-26 13:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562155', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562155', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:43:25] Production.INFO: ==8517== Releasing lock...  
[2025-02-26 13:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:43:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:44:05
    [end_date_ymd] => 2025-02-26 13:44:05
    [RateCDR] => 1
)
  
[2025-02-26 13:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:44:05' and `end` < '2025-02-26 13:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:44:18] Production.INFO: count ==4332  
[2025-02-26 13:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:44:05 - End Time 2025-02-26 13:44:05  
[2025-02-26 13:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562160', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562160', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:44:20] Production.INFO: ProcessCDR(1,14562160,1,1,2)  
[2025-02-26 13:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562160', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562160', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:44:26] Production.INFO: ==8594== Releasing lock...  
[2025-02-26 13:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:44:26] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:45:05
    [end_date_ymd] => 2025-02-26 13:45:05
    [RateCDR] => 1
)
  
[2025-02-26 13:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:45:05' and `end` < '2025-02-26 13:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:45:17] Production.INFO: count ==4349  
[2025-02-26 13:45:19] Production.ERROR: pbx CDR StartTime 2025-02-26 10:45:05 - End Time 2025-02-26 13:45:05  
[2025-02-26 13:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562165', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562165', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:45:19] Production.INFO: ProcessCDR(1,14562165,1,1,2)  
[2025-02-26 13:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:45:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:45:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:45:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:45:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:45:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:45:24] Production.INFO: ==8671== Releasing lock...  
[2025-02-26 13:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:45:24] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 13:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:46:06
    [end_date_ymd] => 2025-02-26 13:46:06
    [RateCDR] => 1
)
  
[2025-02-26 13:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:46:06' and `end` < '2025-02-26 13:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:46:19] Production.INFO: count ==4347  
[2025-02-26 13:46:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:46:06 - End Time 2025-02-26 13:46:06  
[2025-02-26 13:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562170', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562170', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:46:21] Production.INFO: ProcessCDR(1,14562170,1,1,2)  
[2025-02-26 13:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:46:26] Production.INFO: ==8746== Releasing lock...  
[2025-02-26 13:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:46:26] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:47:05
    [end_date_ymd] => 2025-02-26 13:47:05
    [RateCDR] => 1
)
  
[2025-02-26 13:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:47:05' and `end` < '2025-02-26 13:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:47:18] Production.INFO: count ==4327  
[2025-02-26 13:47:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:47:05 - End Time 2025-02-26 13:47:05  
[2025-02-26 13:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562175', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562175', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:47:20] Production.INFO: ProcessCDR(1,14562175,1,1,2)  
[2025-02-26 13:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:47:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:47:26] Production.INFO: ==8825== Releasing lock...  
[2025-02-26 13:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:47:26] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:48:06
    [end_date_ymd] => 2025-02-26 13:48:06
    [RateCDR] => 1
)
  
[2025-02-26 13:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:48:06' and `end` < '2025-02-26 13:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:48:19] Production.INFO: count ==4317  
[2025-02-26 13:48:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:48:06 - End Time 2025-02-26 13:48:06  
[2025-02-26 13:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562180', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562180', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:48:21] Production.INFO: ProcessCDR(1,14562180,1,1,2)  
[2025-02-26 13:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:48:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:48:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:48:26] Production.INFO: ==8902== Releasing lock...  
[2025-02-26 13:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:48:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:49:05
    [end_date_ymd] => 2025-02-26 13:49:05
    [RateCDR] => 1
)
  
[2025-02-26 13:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:49:05' and `end` < '2025-02-26 13:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:49:18] Production.INFO: count ==4303  
[2025-02-26 13:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:49:05 - End Time 2025-02-26 13:49:05  
[2025-02-26 13:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562185', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562185', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:49:20] Production.INFO: ProcessCDR(1,14562185,1,1,2)  
[2025-02-26 13:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:49:24] Production.INFO: ==8981== Releasing lock...  
[2025-02-26 13:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:49:24] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:50:06
    [end_date_ymd] => 2025-02-26 13:50:06
    [RateCDR] => 1
)
  
[2025-02-26 13:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:50:06' and `end` < '2025-02-26 13:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:50:19] Production.INFO: count ==4306  
[2025-02-26 13:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 10:50:06 - End Time 2025-02-26 13:50:06  
[2025-02-26 13:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562190', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562190', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:50:21] Production.INFO: ProcessCDR(1,14562190,1,1,2)  
[2025-02-26 13:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:50:26] Production.INFO: ==9060== Releasing lock...  
[2025-02-26 13:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:50:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:51:05
    [end_date_ymd] => 2025-02-26 13:51:05
    [RateCDR] => 1
)
  
[2025-02-26 13:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:51:05' and `end` < '2025-02-26 13:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:51:18] Production.INFO: count ==4308  
[2025-02-26 13:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:51:05 - End Time 2025-02-26 13:51:05  
[2025-02-26 13:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562196', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562196', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:51:20] Production.INFO: ProcessCDR(1,14562196,1,1,2)  
[2025-02-26 13:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:51:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:51:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562196', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562196', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:51:25] Production.INFO: ==9136== Releasing lock...  
[2025-02-26 13:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:51:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 13:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:52:06
    [end_date_ymd] => 2025-02-26 13:52:06
    [RateCDR] => 1
)
  
[2025-02-26 13:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:52:06' and `end` < '2025-02-26 13:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:52:18] Production.INFO: count ==4319  
[2025-02-26 13:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:52:06 - End Time 2025-02-26 13:52:06  
[2025-02-26 13:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562201', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562201', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:52:20] Production.INFO: ProcessCDR(1,14562201,1,1,2)  
[2025-02-26 13:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:52:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562201', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562201', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:52:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:52:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:52:24] Production.INFO: ==9214== Releasing lock...  
[2025-02-26 13:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:52:24] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:53:05
    [end_date_ymd] => 2025-02-26 13:53:05
    [RateCDR] => 1
)
  
[2025-02-26 13:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:53:05' and `end` < '2025-02-26 13:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:53:18] Production.INFO: count ==4278  
[2025-02-26 13:53:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:53:05 - End Time 2025-02-26 13:53:05  
[2025-02-26 13:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562206', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562206', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:53:20] Production.INFO: ProcessCDR(1,14562206,1,1,2)  
[2025-02-26 13:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:53:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:53:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562206', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562206', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:53:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:53:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:53:25] Production.INFO: ==9296== Releasing lock...  
[2025-02-26 13:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:53:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 13:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:54:05
    [end_date_ymd] => 2025-02-26 13:54:05
    [RateCDR] => 1
)
  
[2025-02-26 13:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:54:05' and `end` < '2025-02-26 13:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:54:18] Production.INFO: count ==4287  
[2025-02-26 13:54:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:54:05 - End Time 2025-02-26 13:54:05  
[2025-02-26 13:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562211', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562211', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:54:20] Production.INFO: ProcessCDR(1,14562211,1,1,2)  
[2025-02-26 13:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:54:26] Production.INFO: ==9411== Releasing lock...  
[2025-02-26 13:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:54:26] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 13:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:55:05
    [end_date_ymd] => 2025-02-26 13:55:05
    [RateCDR] => 1
)
  
[2025-02-26 13:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:55:05' and `end` < '2025-02-26 13:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:55:18] Production.INFO: count ==4284  
[2025-02-26 13:55:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:55:05 - End Time 2025-02-26 13:55:05  
[2025-02-26 13:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562216', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562216', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:55:20] Production.INFO: ProcessCDR(1,14562216,1,1,2)  
[2025-02-26 13:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:55:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:55:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:55:25] Production.INFO: ==9490== Releasing lock...  
[2025-02-26 13:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:55:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 13:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:56:05
    [end_date_ymd] => 2025-02-26 13:56:05
    [RateCDR] => 1
)
  
[2025-02-26 13:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:56:05' and `end` < '2025-02-26 13:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:56:18] Production.INFO: count ==4297  
[2025-02-26 13:56:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:56:05 - End Time 2025-02-26 13:56:05  
[2025-02-26 13:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562220', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562220', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562220', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562220', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:56:20] Production.INFO: ProcessCDR(1,14562220,1,1,2)  
[2025-02-26 13:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562220', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562220', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:56:25] Production.INFO: ==9565== Releasing lock...  
[2025-02-26 13:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:56:25] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:57:05
    [end_date_ymd] => 2025-02-26 13:57:05
    [RateCDR] => 1
)
  
[2025-02-26 13:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:57:05' and `end` < '2025-02-26 13:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:57:18] Production.INFO: count ==4297  
[2025-02-26 13:57:19] Production.ERROR: pbx CDR StartTime 2025-02-26 10:57:05 - End Time 2025-02-26 13:57:05  
[2025-02-26 13:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562226', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562226', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:57:20] Production.INFO: ProcessCDR(1,14562226,1,1,2)  
[2025-02-26 13:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:57:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:57:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:57:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:57:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:57:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:57:25] Production.INFO: ==9641== Releasing lock...  
[2025-02-26 13:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:57:25] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 13:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:58:05
    [end_date_ymd] => 2025-02-26 13:58:05
    [RateCDR] => 1
)
  
[2025-02-26 13:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:58:05' and `end` < '2025-02-26 13:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:58:18] Production.INFO: count ==4287  
[2025-02-26 13:58:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:58:05 - End Time 2025-02-26 13:58:05  
[2025-02-26 13:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562231', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562231', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:58:20] Production.INFO: ProcessCDR(1,14562231,1,1,2)  
[2025-02-26 13:58:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:58:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:58:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:58:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:58:25] Production.INFO: ==9715== Releasing lock...  
[2025-02-26 13:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:58:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 13:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 10:59:06
    [end_date_ymd] => 2025-02-26 13:59:06
    [RateCDR] => 1
)
  
[2025-02-26 13:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 10:59:06' and `end` < '2025-02-26 13:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 13:59:19] Production.INFO: count ==4282  
[2025-02-26 13:59:20] Production.ERROR: pbx CDR StartTime 2025-02-26 10:59:06 - End Time 2025-02-26 13:59:06  
[2025-02-26 13:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 13:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562236', 'tblTempVendorCDR_20' ) start  
[2025-02-26 13:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562236', 'tblTempVendorCDR_20' ) end  
[2025-02-26 13:59:21] Production.INFO: ProcessCDR(1,14562236,1,1,2)  
[2025-02-26 13:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 13:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 13:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 13:59:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 13:59:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 13:59:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 13:59:26] Production.INFO: ==9793== Releasing lock...  
[2025-02-26 13:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 13:59:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:00:07
    [end_date_ymd] => 2025-02-26 14:00:07
    [RateCDR] => 1
)
  
[2025-02-26 14:00:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:00:07' and `end` < '2025-02-26 14:00:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:00:19] Production.INFO: count ==4285  
[2025-02-26 14:00:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:00:07 - End Time 2025-02-26 14:00:07  
[2025-02-26 14:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562242', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562242', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:00:21] Production.INFO: ProcessCDR(1,14562242,1,1,2)  
[2025-02-26 14:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:00:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:00:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562242', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562242', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:00:27] Production.INFO: ==9873== Releasing lock...  
[2025-02-26 14:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:00:27] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:01:05
    [end_date_ymd] => 2025-02-26 14:01:05
    [RateCDR] => 1
)
  
[2025-02-26 14:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:01:05' and `end` < '2025-02-26 14:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:01:18] Production.INFO: count ==4261  
[2025-02-26 14:01:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:01:05 - End Time 2025-02-26 14:01:05  
[2025-02-26 14:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562247', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562247', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:01:20] Production.INFO: ProcessCDR(1,14562247,1,1,2)  
[2025-02-26 14:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:01:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562247', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562247', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:01:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:01:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:01:25] Production.INFO: ==9960== Releasing lock...  
[2025-02-26 14:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:01:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 14:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:02:06
    [end_date_ymd] => 2025-02-26 14:02:06
    [RateCDR] => 1
)
  
[2025-02-26 14:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:02:06' and `end` < '2025-02-26 14:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:02:19] Production.INFO: count ==4272  
[2025-02-26 14:02:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:02:06 - End Time 2025-02-26 14:02:06  
[2025-02-26 14:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562252', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562252', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:02:21] Production.INFO: ProcessCDR(1,14562252,1,1,2)  
[2025-02-26 14:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562252', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:02:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562252', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:02:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:02:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:02:27] Production.INFO: ==10036== Releasing lock...  
[2025-02-26 14:02:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:02:27] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 14:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:03:06
    [end_date_ymd] => 2025-02-26 14:03:06
    [RateCDR] => 1
)
  
[2025-02-26 14:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:03:06' and `end` < '2025-02-26 14:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:03:19] Production.INFO: count ==4271  
[2025-02-26 14:03:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:03:06 - End Time 2025-02-26 14:03:06  
[2025-02-26 14:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562257', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562257', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:03:21] Production.INFO: ProcessCDR(1,14562257,1,1,2)  
[2025-02-26 14:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:03:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562257', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562257', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:03:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:03:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:03:27] Production.INFO: ==10109== Releasing lock...  
[2025-02-26 14:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:03:27] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 14:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:04:06
    [end_date_ymd] => 2025-02-26 14:04:06
    [RateCDR] => 1
)
  
[2025-02-26 14:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:04:06' and `end` < '2025-02-26 14:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:04:19] Production.INFO: count ==4304  
[2025-02-26 14:04:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:04:06 - End Time 2025-02-26 14:04:06  
[2025-02-26 14:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562262', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562262', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:04:21] Production.INFO: ProcessCDR(1,14562262,1,1,2)  
[2025-02-26 14:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:04:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:04:27] Production.INFO: ==10185== Releasing lock...  
[2025-02-26 14:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:04:27] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:05:06
    [end_date_ymd] => 2025-02-26 14:05:06
    [RateCDR] => 1
)
  
[2025-02-26 14:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:05:06' and `end` < '2025-02-26 14:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:05:18] Production.INFO: count ==4305  
[2025-02-26 14:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:05:06 - End Time 2025-02-26 14:05:06  
[2025-02-26 14:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562267', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562267', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:05:21] Production.INFO: ProcessCDR(1,14562267,1,1,2)  
[2025-02-26 14:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:05:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:05:26] Production.INFO: ==10260== Releasing lock...  
[2025-02-26 14:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:05:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:06:06
    [end_date_ymd] => 2025-02-26 14:06:06
    [RateCDR] => 1
)
  
[2025-02-26 14:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:06:06' and `end` < '2025-02-26 14:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:06:19] Production.INFO: count ==4318  
[2025-02-26 14:06:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:06:06 - End Time 2025-02-26 14:06:06  
[2025-02-26 14:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562272', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562272', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:06:21] Production.INFO: ProcessCDR(1,14562272,1,1,2)  
[2025-02-26 14:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:06:27] Production.INFO: ==10339== Releasing lock...  
[2025-02-26 14:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:06:27] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:07:05
    [end_date_ymd] => 2025-02-26 14:07:05
    [RateCDR] => 1
)
  
[2025-02-26 14:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:07:05' and `end` < '2025-02-26 14:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:07:18] Production.INFO: count ==4315  
[2025-02-26 14:07:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:07:05 - End Time 2025-02-26 14:07:05  
[2025-02-26 14:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562277', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562277', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:07:20] Production.INFO: ProcessCDR(1,14562277,1,1,2)  
[2025-02-26 14:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:07:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:07:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:07:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:07:25] Production.INFO: ==10412== Releasing lock...  
[2025-02-26 14:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:07:25] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:08:05
    [end_date_ymd] => 2025-02-26 14:08:05
    [RateCDR] => 1
)
  
[2025-02-26 14:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:08:05' and `end` < '2025-02-26 14:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:08:18] Production.INFO: count ==4314  
[2025-02-26 14:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:08:05 - End Time 2025-02-26 14:08:05  
[2025-02-26 14:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562282', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562282', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:08:20] Production.INFO: ProcessCDR(1,14562282,1,1,2)  
[2025-02-26 14:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:08:25] Production.INFO: ==10490== Releasing lock...  
[2025-02-26 14:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:08:25] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 14:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:09:05
    [end_date_ymd] => 2025-02-26 14:09:05
    [RateCDR] => 1
)
  
[2025-02-26 14:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:09:05' and `end` < '2025-02-26 14:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:09:18] Production.INFO: count ==4322  
[2025-02-26 14:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:09:05 - End Time 2025-02-26 14:09:05  
[2025-02-26 14:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562287', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562287', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:09:20] Production.INFO: ProcessCDR(1,14562287,1,1,2)  
[2025-02-26 14:09:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:09:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:09:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:09:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:09:25] Production.INFO: ==10607== Releasing lock...  
[2025-02-26 14:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:09:25] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 14:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:10:07
    [end_date_ymd] => 2025-02-26 14:10:07
    [RateCDR] => 1
)
  
[2025-02-26 14:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:10:07' and `end` < '2025-02-26 14:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:10:20] Production.INFO: count ==4330  
[2025-02-26 14:10:22] Production.ERROR: pbx CDR StartTime 2025-02-26 11:10:07 - End Time 2025-02-26 14:10:07  
[2025-02-26 14:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562293', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562293', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:10:22] Production.INFO: ProcessCDR(1,14562293,1,1,2)  
[2025-02-26 14:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562293', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562293', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:10:28] Production.INFO: ==10686== Releasing lock...  
[2025-02-26 14:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:10:28] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 14:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:11:05
    [end_date_ymd] => 2025-02-26 14:11:05
    [RateCDR] => 1
)
  
[2025-02-26 14:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:11:05' and `end` < '2025-02-26 14:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:11:18] Production.INFO: count ==4390  
[2025-02-26 14:11:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:11:05 - End Time 2025-02-26 14:11:05  
[2025-02-26 14:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562298', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562298', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:11:20] Production.INFO: ProcessCDR(1,14562298,1,1,2)  
[2025-02-26 14:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:11:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:11:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:11:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562298', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562298', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:11:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:11:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:11:25] Production.INFO: ==10762== Releasing lock...  
[2025-02-26 14:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:11:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:12:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:12:07
    [end_date_ymd] => 2025-02-26 14:12:07
    [RateCDR] => 1
)
  
[2025-02-26 14:12:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:12:07' and `end` < '2025-02-26 14:12:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:12:19] Production.INFO: count ==4402  
[2025-02-26 14:12:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:12:07 - End Time 2025-02-26 14:12:07  
[2025-02-26 14:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562303', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562303', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:12:21] Production.INFO: ProcessCDR(1,14562303,1,1,2)  
[2025-02-26 14:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:12:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:12:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:12:26] Production.INFO: ==10842== Releasing lock...  
[2025-02-26 14:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:12:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:13:05
    [end_date_ymd] => 2025-02-26 14:13:05
    [RateCDR] => 1
)
  
[2025-02-26 14:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:13:05' and `end` < '2025-02-26 14:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:13:18] Production.INFO: count ==4405  
[2025-02-26 14:13:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:13:05 - End Time 2025-02-26 14:13:05  
[2025-02-26 14:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562308', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562308', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:13:20] Production.INFO: ProcessCDR(1,14562308,1,1,2)  
[2025-02-26 14:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562308', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562308', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:13:25] Production.INFO: ==10916== Releasing lock...  
[2025-02-26 14:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:13:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:14:06
    [end_date_ymd] => 2025-02-26 14:14:06
    [RateCDR] => 1
)
  
[2025-02-26 14:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:14:06' and `end` < '2025-02-26 14:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:14:18] Production.INFO: count ==4419  
[2025-02-26 14:14:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:14:06 - End Time 2025-02-26 14:14:06  
[2025-02-26 14:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562313', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562313', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:14:20] Production.INFO: ProcessCDR(1,14562313,1,1,2)  
[2025-02-26 14:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562313', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562313', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:14:25] Production.INFO: ==10990== Releasing lock...  
[2025-02-26 14:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:14:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:15:05
    [end_date_ymd] => 2025-02-26 14:15:05
    [RateCDR] => 1
)
  
[2025-02-26 14:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:15:05' and `end` < '2025-02-26 14:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:15:18] Production.INFO: count ==4414  
[2025-02-26 14:15:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:15:05 - End Time 2025-02-26 14:15:05  
[2025-02-26 14:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562318', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562318', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:15:20] Production.INFO: ProcessCDR(1,14562318,1,1,2)  
[2025-02-26 14:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562318', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562318', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:15:25] Production.INFO: ==11066== Releasing lock...  
[2025-02-26 14:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:15:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:16:06
    [end_date_ymd] => 2025-02-26 14:16:06
    [RateCDR] => 1
)
  
[2025-02-26 14:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:16:06' and `end` < '2025-02-26 14:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:16:18] Production.INFO: count ==4418  
[2025-02-26 14:16:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:16:06 - End Time 2025-02-26 14:16:06  
[2025-02-26 14:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562323', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562323', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:16:21] Production.INFO: ProcessCDR(1,14562323,1,1,2)  
[2025-02-26 14:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562323', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562323', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:16:26] Production.INFO: ==11138== Releasing lock...  
[2025-02-26 14:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:16:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:17:05
    [end_date_ymd] => 2025-02-26 14:17:05
    [RateCDR] => 1
)
  
[2025-02-26 14:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:17:05' and `end` < '2025-02-26 14:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:17:18] Production.INFO: count ==4406  
[2025-02-26 14:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:17:05 - End Time 2025-02-26 14:17:05  
[2025-02-26 14:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562328', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562328', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:17:20] Production.INFO: ProcessCDR(1,14562328,1,1,2)  
[2025-02-26 14:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562328', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562328', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:17:25] Production.INFO: ==11210== Releasing lock...  
[2025-02-26 14:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:17:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:18:06
    [end_date_ymd] => 2025-02-26 14:18:06
    [RateCDR] => 1
)
  
[2025-02-26 14:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:18:06' and `end` < '2025-02-26 14:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:18:19] Production.INFO: count ==4407  
[2025-02-26 14:18:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:18:06 - End Time 2025-02-26 14:18:06  
[2025-02-26 14:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562333', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562333', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:18:21] Production.INFO: ProcessCDR(1,14562333,1,1,2)  
[2025-02-26 14:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562333', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562333', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:18:26] Production.INFO: ==11285== Releasing lock...  
[2025-02-26 14:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:18:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:19:05
    [end_date_ymd] => 2025-02-26 14:19:05
    [RateCDR] => 1
)
  
[2025-02-26 14:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:19:05' and `end` < '2025-02-26 14:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:19:18] Production.INFO: count ==4387  
[2025-02-26 14:19:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:19:05 - End Time 2025-02-26 14:19:05  
[2025-02-26 14:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562338', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562338', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562338', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562338', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:19:20] Production.INFO: ProcessCDR(1,14562338,1,1,2)  
[2025-02-26 14:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562338', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562338', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:19:26] Production.INFO: ==11362== Releasing lock...  
[2025-02-26 14:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:19:26] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 14:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:20:07
    [end_date_ymd] => 2025-02-26 14:20:07
    [RateCDR] => 1
)
  
[2025-02-26 14:20:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:20:07' and `end` < '2025-02-26 14:20:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:20:19] Production.INFO: count ==4385  
[2025-02-26 14:20:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:20:07 - End Time 2025-02-26 14:20:07  
[2025-02-26 14:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562344', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562344', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:20:22] Production.INFO: ProcessCDR(1,14562344,1,1,2)  
[2025-02-26 14:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:20:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562344', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562344', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:20:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:20:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:20:27] Production.INFO: ==11444== Releasing lock...  
[2025-02-26 14:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:20:27] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:21:06
    [end_date_ymd] => 2025-02-26 14:21:06
    [RateCDR] => 1
)
  
[2025-02-26 14:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:21:06' and `end` < '2025-02-26 14:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:21:18] Production.INFO: count ==4417  
[2025-02-26 14:21:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:21:06 - End Time 2025-02-26 14:21:06  
[2025-02-26 14:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562349', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562349', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:21:20] Production.INFO: ProcessCDR(1,14562349,1,1,2)  
[2025-02-26 14:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562349', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562349', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:21:26] Production.INFO: ==11519== Releasing lock...  
[2025-02-26 14:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:21:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 14:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:22:05
    [end_date_ymd] => 2025-02-26 14:22:05
    [RateCDR] => 1
)
  
[2025-02-26 14:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:22:05' and `end` < '2025-02-26 14:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:22:18] Production.INFO: count ==4434  
[2025-02-26 14:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:22:05 - End Time 2025-02-26 14:22:05  
[2025-02-26 14:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562354', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562354', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562354', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562354', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:22:20] Production.INFO: ProcessCDR(1,14562354,1,1,2)  
[2025-02-26 14:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:22:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562354', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562354', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:22:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:22:26] Production.INFO: ==11595== Releasing lock...  
[2025-02-26 14:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:22:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:23:05
    [end_date_ymd] => 2025-02-26 14:23:05
    [RateCDR] => 1
)
  
[2025-02-26 14:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:23:05' and `end` < '2025-02-26 14:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:23:18] Production.INFO: count ==4445  
[2025-02-26 14:23:19] Production.ERROR: pbx CDR StartTime 2025-02-26 11:23:05 - End Time 2025-02-26 14:23:05  
[2025-02-26 14:23:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562359', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562359', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562359', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562359', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:23:20] Production.INFO: ProcessCDR(1,14562359,1,1,2)  
[2025-02-26 14:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562359', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562359', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:23:25] Production.INFO: ==11672== Releasing lock...  
[2025-02-26 14:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:23:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:24:06
    [end_date_ymd] => 2025-02-26 14:24:06
    [RateCDR] => 1
)
  
[2025-02-26 14:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:24:06' and `end` < '2025-02-26 14:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:24:19] Production.INFO: count ==4466  
[2025-02-26 14:24:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:24:06 - End Time 2025-02-26 14:24:06  
[2025-02-26 14:24:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562364', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562364', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:24:21] Production.INFO: ProcessCDR(1,14562364,1,1,2)  
[2025-02-26 14:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:24:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:24:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562364', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562364', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:24:26] Production.INFO: ==11745== Releasing lock...  
[2025-02-26 14:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:24:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:25:05
    [end_date_ymd] => 2025-02-26 14:25:05
    [RateCDR] => 1
)
  
[2025-02-26 14:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:25:05' and `end` < '2025-02-26 14:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:25:18] Production.INFO: count ==4462  
[2025-02-26 14:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:25:05 - End Time 2025-02-26 14:25:05  
[2025-02-26 14:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562369', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562369', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:25:20] Production.INFO: ProcessCDR(1,14562369,1,1,2)  
[2025-02-26 14:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562369', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562369', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:25:25] Production.INFO: ==11858== Releasing lock...  
[2025-02-26 14:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:25:25] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:26:06
    [end_date_ymd] => 2025-02-26 14:26:06
    [RateCDR] => 1
)
  
[2025-02-26 14:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:26:06' and `end` < '2025-02-26 14:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:26:18] Production.INFO: count ==4455  
[2025-02-26 14:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:26:06 - End Time 2025-02-26 14:26:06  
[2025-02-26 14:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562374', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562374', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562374', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562374', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:26:21] Production.INFO: ProcessCDR(1,14562374,1,1,2)  
[2025-02-26 14:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:26:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562374', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562374', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:26:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:26:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:26:25] Production.INFO: ==11935== Releasing lock...  
[2025-02-26 14:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:26:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:27:05
    [end_date_ymd] => 2025-02-26 14:27:05
    [RateCDR] => 1
)
  
[2025-02-26 14:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:27:05' and `end` < '2025-02-26 14:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:27:18] Production.INFO: count ==4462  
[2025-02-26 14:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:27:05 - End Time 2025-02-26 14:27:05  
[2025-02-26 14:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562379', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562379', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562379', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562379', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:27:20] Production.INFO: ProcessCDR(1,14562379,1,1,2)  
[2025-02-26 14:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:27:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:27:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:27:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562379', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562379', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:27:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:27:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:27:24] Production.INFO: ==12008== Releasing lock...  
[2025-02-26 14:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:27:24] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:28:06
    [end_date_ymd] => 2025-02-26 14:28:06
    [RateCDR] => 1
)
  
[2025-02-26 14:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:28:06' and `end` < '2025-02-26 14:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:28:18] Production.INFO: count ==4453  
[2025-02-26 14:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:28:06 - End Time 2025-02-26 14:28:06  
[2025-02-26 14:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562384', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562384', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562384', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562384', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:28:20] Production.INFO: ProcessCDR(1,14562384,1,1,2)  
[2025-02-26 14:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562384', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562384', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:28:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:28:26] Production.INFO: ==12083== Releasing lock...  
[2025-02-26 14:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:28:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:29:06
    [end_date_ymd] => 2025-02-26 14:29:06
    [RateCDR] => 1
)
  
[2025-02-26 14:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:29:06' and `end` < '2025-02-26 14:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:29:18] Production.INFO: count ==4462  
[2025-02-26 14:29:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:29:06 - End Time 2025-02-26 14:29:06  
[2025-02-26 14:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562389', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562389', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562389', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562389', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:29:21] Production.INFO: ProcessCDR(1,14562389,1,1,2)  
[2025-02-26 14:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:29:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:29:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562389', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562389', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:29:26] Production.INFO: ==12156== Releasing lock...  
[2025-02-26 14:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:29:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:30:06
    [end_date_ymd] => 2025-02-26 14:30:06
    [RateCDR] => 1
)
  
[2025-02-26 14:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:30:06' and `end` < '2025-02-26 14:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:30:19] Production.INFO: count ==4456  
[2025-02-26 14:30:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:30:06 - End Time 2025-02-26 14:30:06  
[2025-02-26 14:30:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562394', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562394', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562394', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562394', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:30:21] Production.INFO: ProcessCDR(1,14562394,1,1,2)  
[2025-02-26 14:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:30:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:30:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562394', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562394', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:30:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:30:27] Production.INFO: ==12232== Releasing lock...  
[2025-02-26 14:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:30:27] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:31:05
    [end_date_ymd] => 2025-02-26 14:31:05
    [RateCDR] => 1
)
  
[2025-02-26 14:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:31:05' and `end` < '2025-02-26 14:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:31:18] Production.INFO: count ==4448  
[2025-02-26 14:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:31:05 - End Time 2025-02-26 14:31:05  
[2025-02-26 14:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562400', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562400', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:31:20] Production.INFO: ProcessCDR(1,14562400,1,1,2)  
[2025-02-26 14:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562400', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562400', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:31:25] Production.INFO: ==12309== Releasing lock...  
[2025-02-26 14:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:31:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:32:06
    [end_date_ymd] => 2025-02-26 14:32:06
    [RateCDR] => 1
)
  
[2025-02-26 14:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:32:06' and `end` < '2025-02-26 14:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:32:19] Production.INFO: count ==4451  
[2025-02-26 14:32:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:32:06 - End Time 2025-02-26 14:32:06  
[2025-02-26 14:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562405', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562405', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562405', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562405', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:32:21] Production.INFO: ProcessCDR(1,14562405,1,1,2)  
[2025-02-26 14:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562405', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:32:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562405', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:32:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:32:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:32:27] Production.INFO: ==12389== Releasing lock...  
[2025-02-26 14:32:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:32:27] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:33:05
    [end_date_ymd] => 2025-02-26 14:33:05
    [RateCDR] => 1
)
  
[2025-02-26 14:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:33:05' and `end` < '2025-02-26 14:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:33:18] Production.INFO: count ==4452  
[2025-02-26 14:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:33:05 - End Time 2025-02-26 14:33:05  
[2025-02-26 14:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562410', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562410', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562410', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562410', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:33:20] Production.INFO: ProcessCDR(1,14562410,1,1,2)  
[2025-02-26 14:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:33:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562410', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562410', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:33:26] Production.INFO: ==12464== Releasing lock...  
[2025-02-26 14:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:33:26] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 14:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:34:06
    [end_date_ymd] => 2025-02-26 14:34:06
    [RateCDR] => 1
)
  
[2025-02-26 14:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:34:06' and `end` < '2025-02-26 14:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:34:19] Production.INFO: count ==4467  
[2025-02-26 14:34:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:34:06 - End Time 2025-02-26 14:34:06  
[2025-02-26 14:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562415', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562415', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:34:21] Production.INFO: ProcessCDR(1,14562415,1,1,2)  
[2025-02-26 14:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:34:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:34:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562415', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:34:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562415', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:34:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:34:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:34:27] Production.INFO: ==12539== Releasing lock...  
[2025-02-26 14:34:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:34:27] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:35:05
    [end_date_ymd] => 2025-02-26 14:35:05
    [RateCDR] => 1
)
  
[2025-02-26 14:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:35:05' and `end` < '2025-02-26 14:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:35:18] Production.INFO: count ==4480  
[2025-02-26 14:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:35:05 - End Time 2025-02-26 14:35:05  
[2025-02-26 14:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562420', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562420', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:35:20] Production.INFO: ProcessCDR(1,14562420,1,1,2)  
[2025-02-26 14:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562420', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562420', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:35:26] Production.INFO: ==12623== Releasing lock...  
[2025-02-26 14:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:35:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:36:06
    [end_date_ymd] => 2025-02-26 14:36:06
    [RateCDR] => 1
)
  
[2025-02-26 14:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:36:06' and `end` < '2025-02-26 14:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:36:18] Production.INFO: count ==4489  
[2025-02-26 14:36:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:36:06 - End Time 2025-02-26 14:36:06  
[2025-02-26 14:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562425', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562425', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562425', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562425', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:36:20] Production.INFO: ProcessCDR(1,14562425,1,1,2)  
[2025-02-26 14:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562425', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562425', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:36:26] Production.INFO: ==12720== Releasing lock...  
[2025-02-26 14:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:36:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:37:05
    [end_date_ymd] => 2025-02-26 14:37:05
    [RateCDR] => 1
)
  
[2025-02-26 14:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:37:05' and `end` < '2025-02-26 14:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:37:18] Production.INFO: count ==4486  
[2025-02-26 14:37:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:37:05 - End Time 2025-02-26 14:37:05  
[2025-02-26 14:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562430', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562430', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562430', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562430', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:37:20] Production.INFO: ProcessCDR(1,14562430,1,1,2)  
[2025-02-26 14:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:37:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:37:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:37:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562430', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562430', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:37:25] Production.INFO: ==12800== Releasing lock...  
[2025-02-26 14:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:37:25] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:38:06
    [end_date_ymd] => 2025-02-26 14:38:06
    [RateCDR] => 1
)
  
[2025-02-26 14:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:38:06' and `end` < '2025-02-26 14:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:38:19] Production.INFO: count ==4505  
[2025-02-26 14:38:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:38:06 - End Time 2025-02-26 14:38:06  
[2025-02-26 14:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562435', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562435', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562435', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562435', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:38:21] Production.INFO: ProcessCDR(1,14562435,1,1,2)  
[2025-02-26 14:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:38:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:38:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562435', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:38:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562435', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:38:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:38:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:38:27] Production.INFO: ==12872== Releasing lock...  
[2025-02-26 14:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:38:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:39:05
    [end_date_ymd] => 2025-02-26 14:39:05
    [RateCDR] => 1
)
  
[2025-02-26 14:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:39:05' and `end` < '2025-02-26 14:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:39:18] Production.INFO: count ==4512  
[2025-02-26 14:39:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:39:05 - End Time 2025-02-26 14:39:05  
[2025-02-26 14:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562440', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562440', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562440', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562440', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:39:20] Production.INFO: ProcessCDR(1,14562440,1,1,2)  
[2025-02-26 14:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:39:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562440', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562440', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:39:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:39:26] Production.INFO: ==12950== Releasing lock...  
[2025-02-26 14:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:39:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:40:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:40:07
    [end_date_ymd] => 2025-02-26 14:40:07
    [RateCDR] => 1
)
  
[2025-02-26 14:40:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:40:07' and `end` < '2025-02-26 14:40:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:40:20] Production.INFO: count ==4515  
[2025-02-26 14:40:22] Production.ERROR: pbx CDR StartTime 2025-02-26 11:40:07 - End Time 2025-02-26 14:40:07  
[2025-02-26 14:40:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562446', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562446', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:40:22] Production.INFO: ProcessCDR(1,14562446,1,1,2)  
[2025-02-26 14:40:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:40:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:40:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:40:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562446', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562446', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:40:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:40:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:40:27] Production.INFO: ==13065== Releasing lock...  
[2025-02-26 14:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:40:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:41:05
    [end_date_ymd] => 2025-02-26 14:41:05
    [RateCDR] => 1
)
  
[2025-02-26 14:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:41:05' and `end` < '2025-02-26 14:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:41:18] Production.INFO: count ==4521  
[2025-02-26 14:41:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:41:05 - End Time 2025-02-26 14:41:05  
[2025-02-26 14:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562451', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562451', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:41:20] Production.INFO: ProcessCDR(1,14562451,1,1,2)  
[2025-02-26 14:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562451', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562451', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:41:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:41:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:41:25] Production.INFO: ==13144== Releasing lock...  
[2025-02-26 14:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:41:25] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:42:06
    [end_date_ymd] => 2025-02-26 14:42:06
    [RateCDR] => 1
)
  
[2025-02-26 14:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:42:06' and `end` < '2025-02-26 14:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:42:19] Production.INFO: count ==4511  
[2025-02-26 14:42:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:42:06 - End Time 2025-02-26 14:42:06  
[2025-02-26 14:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562456', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562456', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562456', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562456', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:42:21] Production.INFO: ProcessCDR(1,14562456,1,1,2)  
[2025-02-26 14:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:42:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:42:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562456', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562456', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:42:26] Production.INFO: ==13221== Releasing lock...  
[2025-02-26 14:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:42:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:43:05
    [end_date_ymd] => 2025-02-26 14:43:05
    [RateCDR] => 1
)
  
[2025-02-26 14:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:43:05' and `end` < '2025-02-26 14:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:43:18] Production.INFO: count ==4504  
[2025-02-26 14:43:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:43:05 - End Time 2025-02-26 14:43:05  
[2025-02-26 14:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562461', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562461', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562461', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562461', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:43:21] Production.INFO: ProcessCDR(1,14562461,1,1,2)  
[2025-02-26 14:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:43:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562461', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562461', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:43:26] Production.INFO: ==13296== Releasing lock...  
[2025-02-26 14:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:43:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:44:06
    [end_date_ymd] => 2025-02-26 14:44:06
    [RateCDR] => 1
)
  
[2025-02-26 14:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:44:06' and `end` < '2025-02-26 14:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:44:19] Production.INFO: count ==4510  
[2025-02-26 14:44:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:44:06 - End Time 2025-02-26 14:44:06  
[2025-02-26 14:44:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562466', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562466', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562466', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562466', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:44:21] Production.INFO: ProcessCDR(1,14562466,1,1,2)  
[2025-02-26 14:44:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:44:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:44:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:44:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:44:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562466', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:44:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562466', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:44:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:44:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:44:27] Production.INFO: ==13373== Releasing lock...  
[2025-02-26 14:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:44:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:45:05
    [end_date_ymd] => 2025-02-26 14:45:05
    [RateCDR] => 1
)
  
[2025-02-26 14:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:45:05' and `end` < '2025-02-26 14:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:45:18] Production.INFO: count ==4517  
[2025-02-26 14:45:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:45:05 - End Time 2025-02-26 14:45:05  
[2025-02-26 14:45:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562471', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562471', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:45:20] Production.INFO: ProcessCDR(1,14562471,1,1,2)  
[2025-02-26 14:45:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:45:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:45:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562471', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562471', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:45:26] Production.INFO: ==13454== Releasing lock...  
[2025-02-26 14:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:45:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:46:06
    [end_date_ymd] => 2025-02-26 14:46:06
    [RateCDR] => 1
)
  
[2025-02-26 14:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:46:06' and `end` < '2025-02-26 14:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:46:19] Production.INFO: count ==4521  
[2025-02-26 14:46:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:46:06 - End Time 2025-02-26 14:46:06  
[2025-02-26 14:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562476', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562476', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562476', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562476', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:46:21] Production.INFO: ProcessCDR(1,14562476,1,1,2)  
[2025-02-26 14:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:46:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:46:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562476', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562476', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:46:26] Production.INFO: ==13536== Releasing lock...  
[2025-02-26 14:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:46:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:47:05
    [end_date_ymd] => 2025-02-26 14:47:05
    [RateCDR] => 1
)
  
[2025-02-26 14:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:47:05' and `end` < '2025-02-26 14:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:47:18] Production.INFO: count ==4520  
[2025-02-26 14:47:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:47:05 - End Time 2025-02-26 14:47:05  
[2025-02-26 14:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562481', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562481', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562481', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562481', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:47:20] Production.INFO: ProcessCDR(1,14562481,1,1,2)  
[2025-02-26 14:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:47:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:47:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:47:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562481', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562481', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:47:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:47:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:47:24] Production.INFO: ==13614== Releasing lock...  
[2025-02-26 14:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:47:24] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:48:06
    [end_date_ymd] => 2025-02-26 14:48:06
    [RateCDR] => 1
)
  
[2025-02-26 14:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:48:06' and `end` < '2025-02-26 14:48:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:48:18] Production.INFO: count ==4506  
[2025-02-26 14:48:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:48:06 - End Time 2025-02-26 14:48:06  
[2025-02-26 14:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562486', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562486', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562486', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562486', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:48:21] Production.INFO: ProcessCDR(1,14562486,1,1,2)  
[2025-02-26 14:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562486', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562486', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:48:26] Production.INFO: ==13696== Releasing lock...  
[2025-02-26 14:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:48:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:49:06
    [end_date_ymd] => 2025-02-26 14:49:06
    [RateCDR] => 1
)
  
[2025-02-26 14:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:49:06' and `end` < '2025-02-26 14:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:49:19] Production.INFO: count ==4499  
[2025-02-26 14:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:49:06 - End Time 2025-02-26 14:49:06  
[2025-02-26 14:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562491', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562491', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562491', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562491', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:49:21] Production.INFO: ProcessCDR(1,14562491,1,1,2)  
[2025-02-26 14:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562491', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562491', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:49:26] Production.INFO: ==13776== Releasing lock...  
[2025-02-26 14:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:49:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:50:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:50:07
    [end_date_ymd] => 2025-02-26 14:50:07
    [RateCDR] => 1
)
  
[2025-02-26 14:50:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:50:07' and `end` < '2025-02-26 14:50:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:50:19] Production.INFO: count ==4507  
[2025-02-26 14:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:50:07 - End Time 2025-02-26 14:50:07  
[2025-02-26 14:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562497', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562497', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:50:21] Production.INFO: ProcessCDR(1,14562497,1,1,2)  
[2025-02-26 14:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:50:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:50:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562497', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562497', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:50:26] Production.INFO: ==13858== Releasing lock...  
[2025-02-26 14:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:50:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:51:05
    [end_date_ymd] => 2025-02-26 14:51:05
    [RateCDR] => 1
)
  
[2025-02-26 14:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:51:05' and `end` < '2025-02-26 14:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:51:18] Production.INFO: count ==4488  
[2025-02-26 14:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:51:05 - End Time 2025-02-26 14:51:05  
[2025-02-26 14:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562502', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562502', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:51:20] Production.INFO: ProcessCDR(1,14562502,1,1,2)  
[2025-02-26 14:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562502', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562502', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:51:25] Production.INFO: ==13941== Releasing lock...  
[2025-02-26 14:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:51:25] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:52:06
    [end_date_ymd] => 2025-02-26 14:52:06
    [RateCDR] => 1
)
  
[2025-02-26 14:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:52:06' and `end` < '2025-02-26 14:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:52:19] Production.INFO: count ==4491  
[2025-02-26 14:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:52:06 - End Time 2025-02-26 14:52:06  
[2025-02-26 14:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562507', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562507', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562507', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562507', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:52:21] Production.INFO: ProcessCDR(1,14562507,1,1,2)  
[2025-02-26 14:52:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562507', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562507', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:52:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:52:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:52:26] Production.INFO: ==14023== Releasing lock...  
[2025-02-26 14:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:52:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:53:05
    [end_date_ymd] => 2025-02-26 14:53:05
    [RateCDR] => 1
)
  
[2025-02-26 14:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:53:05' and `end` < '2025-02-26 14:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:53:18] Production.INFO: count ==4492  
[2025-02-26 14:53:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:53:05 - End Time 2025-02-26 14:53:05  
[2025-02-26 14:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562512', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562512', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562512', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562512', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:53:20] Production.INFO: ProcessCDR(1,14562512,1,1,2)  
[2025-02-26 14:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562512', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562512', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:53:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:53:26] Production.INFO: ==14104== Releasing lock...  
[2025-02-26 14:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:53:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:54:05
    [end_date_ymd] => 2025-02-26 14:54:05
    [RateCDR] => 1
)
  
[2025-02-26 14:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:54:05' and `end` < '2025-02-26 14:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:54:18] Production.INFO: count ==4487  
[2025-02-26 14:54:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:54:05 - End Time 2025-02-26 14:54:05  
[2025-02-26 14:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562517', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562517', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:54:20] Production.INFO: ProcessCDR(1,14562517,1,1,2)  
[2025-02-26 14:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562517', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562517', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:54:26] Production.INFO: ==14178== Releasing lock...  
[2025-02-26 14:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:54:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:55:05
    [end_date_ymd] => 2025-02-26 14:55:05
    [RateCDR] => 1
)
  
[2025-02-26 14:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:55:05' and `end` < '2025-02-26 14:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:55:19] Production.INFO: count ==4478  
[2025-02-26 14:55:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:55:05 - End Time 2025-02-26 14:55:05  
[2025-02-26 14:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562522', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562522', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:55:21] Production.INFO: ProcessCDR(1,14562522,1,1,2)  
[2025-02-26 14:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562522', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562522', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:55:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:55:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:55:26] Production.INFO: ==14256== Releasing lock...  
[2025-02-26 14:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:55:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:56:06
    [end_date_ymd] => 2025-02-26 14:56:06
    [RateCDR] => 1
)
  
[2025-02-26 14:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:56:06' and `end` < '2025-02-26 14:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:56:19] Production.INFO: count ==4486  
[2025-02-26 14:56:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:56:06 - End Time 2025-02-26 14:56:06  
[2025-02-26 14:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562527', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562527', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:56:21] Production.INFO: ProcessCDR(1,14562527,1,1,2)  
[2025-02-26 14:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:56:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562527', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562527', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:56:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:56:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:56:26] Production.INFO: ==14373== Releasing lock...  
[2025-02-26 14:56:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:56:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 14:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:57:05
    [end_date_ymd] => 2025-02-26 14:57:05
    [RateCDR] => 1
)
  
[2025-02-26 14:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:57:05' and `end` < '2025-02-26 14:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:57:19] Production.INFO: count ==4504  
[2025-02-26 14:57:21] Production.ERROR: pbx CDR StartTime 2025-02-26 11:57:05 - End Time 2025-02-26 14:57:05  
[2025-02-26 14:57:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562532', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562532', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562532', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562532', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:57:21] Production.INFO: ProcessCDR(1,14562532,1,1,2)  
[2025-02-26 14:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:57:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562532', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562532', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:57:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:57:26] Production.INFO: ==14449== Releasing lock...  
[2025-02-26 14:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:57:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 14:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:58:05
    [end_date_ymd] => 2025-02-26 14:58:05
    [RateCDR] => 1
)
  
[2025-02-26 14:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:58:05' and `end` < '2025-02-26 14:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:58:18] Production.INFO: count ==4524  
[2025-02-26 14:58:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:58:05 - End Time 2025-02-26 14:58:05  
[2025-02-26 14:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562537', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562537', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562537', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562537', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:58:20] Production.INFO: ProcessCDR(1,14562537,1,1,2)  
[2025-02-26 14:58:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:58:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562537', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562537', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:58:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:58:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:58:25] Production.INFO: ==14525== Releasing lock...  
[2025-02-26 14:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:58:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 14:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 11:59:06
    [end_date_ymd] => 2025-02-26 14:59:06
    [RateCDR] => 1
)
  
[2025-02-26 14:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 11:59:06' and `end` < '2025-02-26 14:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 14:59:18] Production.INFO: count ==4515  
[2025-02-26 14:59:20] Production.ERROR: pbx CDR StartTime 2025-02-26 11:59:06 - End Time 2025-02-26 14:59:06  
[2025-02-26 14:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 14:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562542', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562542', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562542', 'tblTempVendorCDR_20' ) start  
[2025-02-26 14:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562542', 'tblTempVendorCDR_20' ) end  
[2025-02-26 14:59:20] Production.INFO: ProcessCDR(1,14562542,1,1,2)  
[2025-02-26 14:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 14:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 14:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562542', 'tblTempUsageDetail_20' ) start  
[2025-02-26 14:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562542', 'tblTempUsageDetail_20' ) end  
[2025-02-26 14:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 14:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 14:59:26] Production.INFO: ==14604== Releasing lock...  
[2025-02-26 14:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 14:59:26] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 15:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:00:06
    [end_date_ymd] => 2025-02-26 15:00:06
    [RateCDR] => 1
)
  
[2025-02-26 15:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:00:06' and `end` < '2025-02-26 15:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:00:19] Production.INFO: count ==4523  
[2025-02-26 15:00:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:00:06 - End Time 2025-02-26 15:00:06  
[2025-02-26 15:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562546', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562546', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:00:21] Production.INFO: ProcessCDR(1,14562546,1,1,2)  
[2025-02-26 15:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:00:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:00:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:00:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:00:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:00:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:00:26] Production.INFO: ==14694== Releasing lock...  
[2025-02-26 15:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:00:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:01:05
    [end_date_ymd] => 2025-02-26 15:01:05
    [RateCDR] => 1
)
  
[2025-02-26 15:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:01:05' and `end` < '2025-02-26 15:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:01:18] Production.INFO: count ==4531  
[2025-02-26 15:01:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:01:05 - End Time 2025-02-26 15:01:05  
[2025-02-26 15:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562553', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562553', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:01:20] Production.INFO: ProcessCDR(1,14562553,1,1,2)  
[2025-02-26 15:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:01:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562553', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562553', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:01:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:01:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:01:25] Production.INFO: ==14784== Releasing lock...  
[2025-02-26 15:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:01:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:02:06
    [end_date_ymd] => 2025-02-26 15:02:06
    [RateCDR] => 1
)
  
[2025-02-26 15:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:02:06' and `end` < '2025-02-26 15:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:02:19] Production.INFO: count ==4529  
[2025-02-26 15:02:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:02:06 - End Time 2025-02-26 15:02:06  
[2025-02-26 15:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562558', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562558', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:02:21] Production.INFO: ProcessCDR(1,14562558,1,1,2)  
[2025-02-26 15:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562558', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562558', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:02:26] Production.INFO: ==14945== Releasing lock...  
[2025-02-26 15:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:02:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:03:05
    [end_date_ymd] => 2025-02-26 15:03:05
    [RateCDR] => 1
)
  
[2025-02-26 15:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:03:05' and `end` < '2025-02-26 15:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:03:18] Production.INFO: count ==4540  
[2025-02-26 15:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:03:05 - End Time 2025-02-26 15:03:05  
[2025-02-26 15:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562563', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562563', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562563', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562563', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:03:20] Production.INFO: ProcessCDR(1,14562563,1,1,2)  
[2025-02-26 15:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562563', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562563', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:03:26] Production.INFO: ==15024== Releasing lock...  
[2025-02-26 15:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:03:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:04:06
    [end_date_ymd] => 2025-02-26 15:04:06
    [RateCDR] => 1
)
  
[2025-02-26 15:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:04:06' and `end` < '2025-02-26 15:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:04:19] Production.INFO: count ==4539  
[2025-02-26 15:04:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:04:06 - End Time 2025-02-26 15:04:06  
[2025-02-26 15:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562568', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562568', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:04:21] Production.INFO: ProcessCDR(1,14562568,1,1,2)  
[2025-02-26 15:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562568', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562568', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:04:26] Production.INFO: ==15100== Releasing lock...  
[2025-02-26 15:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:04:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:05:05
    [end_date_ymd] => 2025-02-26 15:05:05
    [RateCDR] => 1
)
  
[2025-02-26 15:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:05:05' and `end` < '2025-02-26 15:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:05:18] Production.INFO: count ==4549  
[2025-02-26 15:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:05:05 - End Time 2025-02-26 15:05:05  
[2025-02-26 15:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562573', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562573', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:05:20] Production.INFO: ProcessCDR(1,14562573,1,1,2)  
[2025-02-26 15:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562573', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562573', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:05:25] Production.INFO: ==15257== Releasing lock...  
[2025-02-26 15:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:05:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:06:06
    [end_date_ymd] => 2025-02-26 15:06:06
    [RateCDR] => 1
)
  
[2025-02-26 15:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:06:06' and `end` < '2025-02-26 15:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:06:19] Production.INFO: count ==4558  
[2025-02-26 15:06:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:06:06 - End Time 2025-02-26 15:06:06  
[2025-02-26 15:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562578', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562578', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:06:21] Production.INFO: ProcessCDR(1,14562578,1,1,2)  
[2025-02-26 15:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562578', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562578', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:06:26] Production.INFO: ==15334== Releasing lock...  
[2025-02-26 15:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:06:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 15:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:07:05
    [end_date_ymd] => 2025-02-26 15:07:05
    [RateCDR] => 1
)
  
[2025-02-26 15:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:07:05' and `end` < '2025-02-26 15:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:07:18] Production.INFO: count ==4553  
[2025-02-26 15:07:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:07:05 - End Time 2025-02-26 15:07:05  
[2025-02-26 15:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562583', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562583', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562583', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562583', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:07:20] Production.INFO: ProcessCDR(1,14562583,1,1,2)  
[2025-02-26 15:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562583', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562583', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:07:26] Production.INFO: ==15411== Releasing lock...  
[2025-02-26 15:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:07:26] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 15:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:08:05
    [end_date_ymd] => 2025-02-26 15:08:05
    [RateCDR] => 1
)
  
[2025-02-26 15:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:08:05' and `end` < '2025-02-26 15:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:08:18] Production.INFO: count ==4558  
[2025-02-26 15:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:08:05 - End Time 2025-02-26 15:08:05  
[2025-02-26 15:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562588', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562588', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562588', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562588', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:08:20] Production.INFO: ProcessCDR(1,14562588,1,1,2)  
[2025-02-26 15:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562588', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562588', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:08:25] Production.INFO: ==15529== Releasing lock...  
[2025-02-26 15:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:08:25] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 15:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:09:05
    [end_date_ymd] => 2025-02-26 15:09:05
    [RateCDR] => 1
)
  
[2025-02-26 15:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:09:05' and `end` < '2025-02-26 15:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:09:18] Production.INFO: count ==4560  
[2025-02-26 15:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:09:05 - End Time 2025-02-26 15:09:05  
[2025-02-26 15:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562593', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562593', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562593', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562593', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:09:21] Production.INFO: ProcessCDR(1,14562593,1,1,2)  
[2025-02-26 15:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562593', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562593', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:09:26] Production.INFO: ==15642== Releasing lock...  
[2025-02-26 15:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:09:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 15:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:10:07
    [end_date_ymd] => 2025-02-26 15:10:07
    [RateCDR] => 1
)
  
[2025-02-26 15:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:10:07' and `end` < '2025-02-26 15:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:10:20] Production.INFO: count ==4559  
[2025-02-26 15:10:22] Production.ERROR: pbx CDR StartTime 2025-02-26 12:10:07 - End Time 2025-02-26 15:10:07  
[2025-02-26 15:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562599', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562599', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:10:22] Production.INFO: ProcessCDR(1,14562599,1,1,2)  
[2025-02-26 15:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:10:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562599', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562599', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:10:28] Production.INFO: ==15728== Releasing lock...  
[2025-02-26 15:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:10:28] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 15:11:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:11:04
    [end_date_ymd] => 2025-02-26 15:11:04
    [RateCDR] => 1
)
  
[2025-02-26 15:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:11:04' and `end` < '2025-02-26 15:11:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:11:17] Production.INFO: count ==4606  
[2025-02-26 15:11:19] Production.ERROR: pbx CDR StartTime 2025-02-26 12:11:04 - End Time 2025-02-26 15:11:04  
[2025-02-26 15:11:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562602', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562602', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:11:20] Production.INFO: ProcessCDR(1,14562602,1,1,2)  
[2025-02-26 15:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:11:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:11:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:11:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:11:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:11:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:11:25] Production.INFO: ==15850== Releasing lock...  
[2025-02-26 15:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:11:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:12:05
    [end_date_ymd] => 2025-02-26 15:12:05
    [RateCDR] => 1
)
  
[2025-02-26 15:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:12:05' and `end` < '2025-02-26 15:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:12:19] Production.INFO: count ==4578  
[2025-02-26 15:12:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:12:05 - End Time 2025-02-26 15:12:05  
[2025-02-26 15:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562609', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562609', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562609', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562609', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:12:21] Production.INFO: ProcessCDR(1,14562609,1,1,2)  
[2025-02-26 15:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562609', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562609', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:12:26] Production.INFO: ==16011== Releasing lock...  
[2025-02-26 15:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:12:26] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 15:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:13:05
    [end_date_ymd] => 2025-02-26 15:13:05
    [RateCDR] => 1
)
  
[2025-02-26 15:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:13:05' and `end` < '2025-02-26 15:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:13:22] Production.INFO: count ==4602  
[2025-02-26 15:13:24] Production.ERROR: pbx CDR StartTime 2025-02-26 12:13:05 - End Time 2025-02-26 15:13:05  
[2025-02-26 15:13:24] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:13:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562614', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:13:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562614', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:13:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562614', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:13:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562614', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:13:24] Production.INFO: ProcessCDR(1,14562614,1,1,2)  
[2025-02-26 15:13:24] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:13:27] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:13:27] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:13:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:13:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562614', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:13:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562614', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:13:29] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:13:29] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:13:29] Production.INFO: ==16093== Releasing lock...  
[2025-02-26 15:13:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:13:29] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:14:05
    [end_date_ymd] => 2025-02-26 15:14:05
    [RateCDR] => 1
)
  
[2025-02-26 15:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:14:05' and `end` < '2025-02-26 15:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:14:18] Production.INFO: count ==4624  
[2025-02-26 15:14:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:14:05 - End Time 2025-02-26 15:14:05  
[2025-02-26 15:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562619', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562619', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:14:20] Production.INFO: ProcessCDR(1,14562619,1,1,2)  
[2025-02-26 15:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562619', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562619', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:14:25] Production.INFO: ==16167== Releasing lock...  
[2025-02-26 15:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:14:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:15:05
    [end_date_ymd] => 2025-02-26 15:15:05
    [RateCDR] => 1
)
  
[2025-02-26 15:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:15:05' and `end` < '2025-02-26 15:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:15:18] Production.INFO: count ==4619  
[2025-02-26 15:15:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:15:05 - End Time 2025-02-26 15:15:05  
[2025-02-26 15:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562624', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562624', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:15:20] Production.INFO: ProcessCDR(1,14562624,1,1,2)  
[2025-02-26 15:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562624', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562624', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:15:25] Production.INFO: ==16321== Releasing lock...  
[2025-02-26 15:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:15:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:16:05
    [end_date_ymd] => 2025-02-26 15:16:05
    [RateCDR] => 1
)
  
[2025-02-26 15:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:16:05' and `end` < '2025-02-26 15:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:16:18] Production.INFO: count ==4612  
[2025-02-26 15:16:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:16:05 - End Time 2025-02-26 15:16:05  
[2025-02-26 15:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562629', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562629', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562629', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562629', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:16:20] Production.INFO: ProcessCDR(1,14562629,1,1,2)  
[2025-02-26 15:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:16:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562629', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562629', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:16:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:16:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:16:25] Production.INFO: ==16398== Releasing lock...  
[2025-02-26 15:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:16:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:17:05
    [end_date_ymd] => 2025-02-26 15:17:05
    [RateCDR] => 1
)
  
[2025-02-26 15:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:17:05' and `end` < '2025-02-26 15:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:17:18] Production.INFO: count ==4615  
[2025-02-26 15:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:17:05 - End Time 2025-02-26 15:17:05  
[2025-02-26 15:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562634', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562634', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562634', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562634', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:17:20] Production.INFO: ProcessCDR(1,14562634,1,1,2)  
[2025-02-26 15:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562634', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562634', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:17:25] Production.INFO: ==16472== Releasing lock...  
[2025-02-26 15:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:17:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:18:05
    [end_date_ymd] => 2025-02-26 15:18:05
    [RateCDR] => 1
)
  
[2025-02-26 15:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:18:05' and `end` < '2025-02-26 15:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:18:18] Production.INFO: count ==4612  
[2025-02-26 15:18:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:18:05 - End Time 2025-02-26 15:18:05  
[2025-02-26 15:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562639', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562639', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562639', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562639', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:18:20] Production.INFO: ProcessCDR(1,14562639,1,1,2)  
[2025-02-26 15:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562639', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562639', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:18:25] Production.INFO: ==16541== Releasing lock...  
[2025-02-26 15:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:18:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:19:05
    [end_date_ymd] => 2025-02-26 15:19:05
    [RateCDR] => 1
)
  
[2025-02-26 15:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:19:05' and `end` < '2025-02-26 15:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:19:19] Production.INFO: count ==4622  
[2025-02-26 15:19:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:19:05 - End Time 2025-02-26 15:19:05  
[2025-02-26 15:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562644', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562644', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562644', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562644', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:19:21] Production.INFO: ProcessCDR(1,14562644,1,1,2)  
[2025-02-26 15:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562644', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562644', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:19:26] Production.INFO: ==16618== Releasing lock...  
[2025-02-26 15:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:19:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:20:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:20:05
    [end_date_ymd] => 2025-02-26 15:20:05
    [RateCDR] => 1
)
  
[2025-02-26 15:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:20:05' and `end` < '2025-02-26 15:20:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:20:18] Production.INFO: count ==4614  
[2025-02-26 15:20:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:20:05 - End Time 2025-02-26 15:20:05  
[2025-02-26 15:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562650', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562650', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:20:20] Production.INFO: ProcessCDR(1,14562650,1,1,2)  
[2025-02-26 15:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:20:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:20:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562650', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562650', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:20:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:20:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:20:25] Production.INFO: ==16695== Releasing lock...  
[2025-02-26 15:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:20:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:21:06
    [end_date_ymd] => 2025-02-26 15:21:06
    [RateCDR] => 1
)
  
[2025-02-26 15:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:21:06' and `end` < '2025-02-26 15:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:21:19] Production.INFO: count ==4650  
[2025-02-26 15:21:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:21:06 - End Time 2025-02-26 15:21:06  
[2025-02-26 15:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562655', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562655', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:21:21] Production.INFO: ProcessCDR(1,14562655,1,1,2)  
[2025-02-26 15:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:21:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562655', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562655', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:21:26] Production.INFO: ==16772== Releasing lock...  
[2025-02-26 15:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:21:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:22:06
    [end_date_ymd] => 2025-02-26 15:22:06
    [RateCDR] => 1
)
  
[2025-02-26 15:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:22:06' and `end` < '2025-02-26 15:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:22:19] Production.INFO: count ==4645  
[2025-02-26 15:22:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:22:06 - End Time 2025-02-26 15:22:06  
[2025-02-26 15:22:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562660', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562660', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562660', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562660', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:22:21] Production.INFO: ProcessCDR(1,14562660,1,1,2)  
[2025-02-26 15:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:22:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:22:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:22:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562660', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562660', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:22:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:22:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:22:24] Production.INFO: ==16848== Releasing lock...  
[2025-02-26 15:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:22:24] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:23:05
    [end_date_ymd] => 2025-02-26 15:23:05
    [RateCDR] => 1
)
  
[2025-02-26 15:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:23:05' and `end` < '2025-02-26 15:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:23:18] Production.INFO: count ==4657  
[2025-02-26 15:23:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:23:05 - End Time 2025-02-26 15:23:05  
[2025-02-26 15:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562665', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562665', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562665', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562665', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:23:20] Production.INFO: ProcessCDR(1,14562665,1,1,2)  
[2025-02-26 15:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562665', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562665', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:23:25] Production.INFO: ==16926== Releasing lock...  
[2025-02-26 15:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:23:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:24:05
    [end_date_ymd] => 2025-02-26 15:24:05
    [RateCDR] => 1
)
  
[2025-02-26 15:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:24:05' and `end` < '2025-02-26 15:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:24:18] Production.INFO: count ==4664  
[2025-02-26 15:24:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:24:05 - End Time 2025-02-26 15:24:05  
[2025-02-26 15:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562670', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562670', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:24:20] Production.INFO: ProcessCDR(1,14562670,1,1,2)  
[2025-02-26 15:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562670', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562670', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:24:26] Production.INFO: ==16995== Releasing lock...  
[2025-02-26 15:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:24:26] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:25:05
    [end_date_ymd] => 2025-02-26 15:25:05
    [RateCDR] => 1
)
  
[2025-02-26 15:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:25:05' and `end` < '2025-02-26 15:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:25:18] Production.INFO: count ==4667  
[2025-02-26 15:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:25:05 - End Time 2025-02-26 15:25:05  
[2025-02-26 15:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562675', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562675', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:25:20] Production.INFO: ProcessCDR(1,14562675,1,1,2)  
[2025-02-26 15:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562675', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562675', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:25:25] Production.INFO: ==17068== Releasing lock...  
[2025-02-26 15:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:25:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:26:05
    [end_date_ymd] => 2025-02-26 15:26:05
    [RateCDR] => 1
)
  
[2025-02-26 15:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:26:05' and `end` < '2025-02-26 15:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:26:18] Production.INFO: count ==4665  
[2025-02-26 15:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:26:05 - End Time 2025-02-26 15:26:05  
[2025-02-26 15:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562680', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562680', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:26:20] Production.INFO: ProcessCDR(1,14562680,1,1,2)  
[2025-02-26 15:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:26:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562680', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562680', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:26:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:26:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:26:25] Production.INFO: ==17143== Releasing lock...  
[2025-02-26 15:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:26:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:27:05
    [end_date_ymd] => 2025-02-26 15:27:05
    [RateCDR] => 1
)
  
[2025-02-26 15:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:27:05' and `end` < '2025-02-26 15:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:27:18] Production.INFO: count ==4648  
[2025-02-26 15:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:27:05 - End Time 2025-02-26 15:27:05  
[2025-02-26 15:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562685', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562685', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562685', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562685', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:27:20] Production.INFO: ProcessCDR(1,14562685,1,1,2)  
[2025-02-26 15:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562685', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562685', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:27:25] Production.INFO: ==17256== Releasing lock...  
[2025-02-26 15:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:27:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:28:05
    [end_date_ymd] => 2025-02-26 15:28:05
    [RateCDR] => 1
)
  
[2025-02-26 15:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:28:05' and `end` < '2025-02-26 15:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:28:18] Production.INFO: count ==4632  
[2025-02-26 15:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:28:05 - End Time 2025-02-26 15:28:05  
[2025-02-26 15:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562690', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562690', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562690', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562690', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:28:20] Production.INFO: ProcessCDR(1,14562690,1,1,2)  
[2025-02-26 15:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:28:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:28:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:28:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562690', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562690', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:28:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:28:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:28:25] Production.INFO: ==17364== Releasing lock...  
[2025-02-26 15:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:28:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:29:05
    [end_date_ymd] => 2025-02-26 15:29:05
    [RateCDR] => 1
)
  
[2025-02-26 15:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:29:05' and `end` < '2025-02-26 15:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:29:18] Production.INFO: count ==4646  
[2025-02-26 15:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:29:05 - End Time 2025-02-26 15:29:05  
[2025-02-26 15:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562695', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562695', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562695', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562695', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:29:20] Production.INFO: ProcessCDR(1,14562695,1,1,2)  
[2025-02-26 15:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562695', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562695', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:29:25] Production.INFO: ==17437== Releasing lock...  
[2025-02-26 15:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:29:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:30:05
    [end_date_ymd] => 2025-02-26 15:30:05
    [RateCDR] => 1
)
  
[2025-02-26 15:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:30:05' and `end` < '2025-02-26 15:30:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:30:18] Production.INFO: count ==4661  
[2025-02-26 15:30:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:30:05 - End Time 2025-02-26 15:30:05  
[2025-02-26 15:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562701', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562701', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:30:20] Production.INFO: ProcessCDR(1,14562701,1,1,2)  
[2025-02-26 15:30:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:30:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:30:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:30:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562701', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562701', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:30:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:30:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:30:25] Production.INFO: ==17516== Releasing lock...  
[2025-02-26 15:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:30:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:31:05
    [end_date_ymd] => 2025-02-26 15:31:05
    [RateCDR] => 1
)
  
[2025-02-26 15:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:31:05' and `end` < '2025-02-26 15:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:31:18] Production.INFO: count ==4686  
[2025-02-26 15:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:31:05 - End Time 2025-02-26 15:31:05  
[2025-02-26 15:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562706', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562706', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:31:20] Production.INFO: ProcessCDR(1,14562706,1,1,2)  
[2025-02-26 15:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:31:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562706', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562706', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:31:25] Production.INFO: ==17588== Releasing lock...  
[2025-02-26 15:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:31:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:32:05
    [end_date_ymd] => 2025-02-26 15:32:05
    [RateCDR] => 1
)
  
[2025-02-26 15:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:32:05' and `end` < '2025-02-26 15:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:32:18] Production.INFO: count ==4675  
[2025-02-26 15:32:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:32:05 - End Time 2025-02-26 15:32:05  
[2025-02-26 15:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562711', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562711', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:32:20] Production.INFO: ProcessCDR(1,14562711,1,1,2)  
[2025-02-26 15:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562711', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562711', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:32:25] Production.INFO: ==17659== Releasing lock...  
[2025-02-26 15:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:32:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:33:05
    [end_date_ymd] => 2025-02-26 15:33:05
    [RateCDR] => 1
)
  
[2025-02-26 15:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:33:05' and `end` < '2025-02-26 15:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:33:18] Production.INFO: count ==4669  
[2025-02-26 15:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:33:05 - End Time 2025-02-26 15:33:05  
[2025-02-26 15:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562716', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562716', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562716', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562716', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:33:20] Production.INFO: ProcessCDR(1,14562716,1,1,2)  
[2025-02-26 15:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562716', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562716', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:33:25] Production.INFO: ==17733== Releasing lock...  
[2025-02-26 15:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:33:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:34:05
    [end_date_ymd] => 2025-02-26 15:34:05
    [RateCDR] => 1
)
  
[2025-02-26 15:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:34:05' and `end` < '2025-02-26 15:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:34:18] Production.INFO: count ==4644  
[2025-02-26 15:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:34:05 - End Time 2025-02-26 15:34:05  
[2025-02-26 15:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562721', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562721', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:34:20] Production.INFO: ProcessCDR(1,14562721,1,1,2)  
[2025-02-26 15:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562721', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562721', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:34:25] Production.INFO: ==17804== Releasing lock...  
[2025-02-26 15:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:34:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:35:05
    [end_date_ymd] => 2025-02-26 15:35:05
    [RateCDR] => 1
)
  
[2025-02-26 15:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:35:05' and `end` < '2025-02-26 15:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:35:18] Production.INFO: count ==4634  
[2025-02-26 15:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:35:05 - End Time 2025-02-26 15:35:05  
[2025-02-26 15:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562726', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562726', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:35:21] Production.INFO: ProcessCDR(1,14562726,1,1,2)  
[2025-02-26 15:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562726', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562726', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:35:25] Production.INFO: ==17874== Releasing lock...  
[2025-02-26 15:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:35:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:36:05
    [end_date_ymd] => 2025-02-26 15:36:05
    [RateCDR] => 1
)
  
[2025-02-26 15:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:36:05' and `end` < '2025-02-26 15:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:36:18] Production.INFO: count ==4626  
[2025-02-26 15:36:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:36:05 - End Time 2025-02-26 15:36:05  
[2025-02-26 15:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562731', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562731', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562731', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562731', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:36:20] Production.INFO: ProcessCDR(1,14562731,1,1,2)  
[2025-02-26 15:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:36:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:36:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562731', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562731', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:36:25] Production.INFO: ==17944== Releasing lock...  
[2025-02-26 15:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:36:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:37:05
    [end_date_ymd] => 2025-02-26 15:37:05
    [RateCDR] => 1
)
  
[2025-02-26 15:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:37:05' and `end` < '2025-02-26 15:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:37:18] Production.INFO: count ==4617  
[2025-02-26 15:37:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:37:05 - End Time 2025-02-26 15:37:05  
[2025-02-26 15:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562736', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562736', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562736', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562736', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:37:20] Production.INFO: ProcessCDR(1,14562736,1,1,2)  
[2025-02-26 15:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:37:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562736', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562736', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:37:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:37:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:37:24] Production.INFO: ==18016== Releasing lock...  
[2025-02-26 15:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:37:24] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 15:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:38:05
    [end_date_ymd] => 2025-02-26 15:38:05
    [RateCDR] => 1
)
  
[2025-02-26 15:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:38:05' and `end` < '2025-02-26 15:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:38:18] Production.INFO: count ==4627  
[2025-02-26 15:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:38:05 - End Time 2025-02-26 15:38:05  
[2025-02-26 15:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562741', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562741', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562741', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562741', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:38:20] Production.INFO: ProcessCDR(1,14562741,1,1,2)  
[2025-02-26 15:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562741', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562741', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:38:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:38:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:38:26] Production.INFO: ==18090== Releasing lock...  
[2025-02-26 15:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:38:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:39:05
    [end_date_ymd] => 2025-02-26 15:39:05
    [RateCDR] => 1
)
  
[2025-02-26 15:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:39:05' and `end` < '2025-02-26 15:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:39:18] Production.INFO: count ==4638  
[2025-02-26 15:39:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:39:05 - End Time 2025-02-26 15:39:05  
[2025-02-26 15:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562746', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562746', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562746', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562746', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:39:20] Production.INFO: ProcessCDR(1,14562746,1,1,2)  
[2025-02-26 15:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562746', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562746', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:39:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:39:26] Production.INFO: ==18160== Releasing lock...  
[2025-02-26 15:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:39:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:40:06
    [end_date_ymd] => 2025-02-26 15:40:06
    [RateCDR] => 1
)
  
[2025-02-26 15:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:40:06' and `end` < '2025-02-26 15:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:40:19] Production.INFO: count ==4642  
[2025-02-26 15:40:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:40:06 - End Time 2025-02-26 15:40:06  
[2025-02-26 15:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562752', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562752', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:40:21] Production.INFO: ProcessCDR(1,14562752,1,1,2)  
[2025-02-26 15:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562752', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562752', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:40:26] Production.INFO: ==18239== Releasing lock...  
[2025-02-26 15:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:40:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 15:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:41:05
    [end_date_ymd] => 2025-02-26 15:41:05
    [RateCDR] => 1
)
  
[2025-02-26 15:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:41:05' and `end` < '2025-02-26 15:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:41:18] Production.INFO: count ==4667  
[2025-02-26 15:41:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:41:05 - End Time 2025-02-26 15:41:05  
[2025-02-26 15:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562757', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562757', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:41:20] Production.INFO: ProcessCDR(1,14562757,1,1,2)  
[2025-02-26 15:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:41:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:41:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562757', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562757', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:41:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:41:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:41:25] Production.INFO: ==18313== Releasing lock...  
[2025-02-26 15:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:41:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:42:05
    [end_date_ymd] => 2025-02-26 15:42:05
    [RateCDR] => 1
)
  
[2025-02-26 15:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:42:05' and `end` < '2025-02-26 15:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:42:18] Production.INFO: count ==4688  
[2025-02-26 15:42:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:42:05 - End Time 2025-02-26 15:42:05  
[2025-02-26 15:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562762', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562762', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562762', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562762', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:42:20] Production.INFO: ProcessCDR(1,14562762,1,1,2)  
[2025-02-26 15:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:42:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562762', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562762', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:42:25] Production.INFO: ==18423== Releasing lock...  
[2025-02-26 15:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:42:25] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 15:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:43:05
    [end_date_ymd] => 2025-02-26 15:43:05
    [RateCDR] => 1
)
  
[2025-02-26 15:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:43:05' and `end` < '2025-02-26 15:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:43:18] Production.INFO: count ==4722  
[2025-02-26 15:43:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:43:05 - End Time 2025-02-26 15:43:05  
[2025-02-26 15:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562767', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562767', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562767', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562767', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:43:20] Production.INFO: ProcessCDR(1,14562767,1,1,2)  
[2025-02-26 15:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562767', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562767', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:43:25] Production.INFO: ==18496== Releasing lock...  
[2025-02-26 15:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:43:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:44:05
    [end_date_ymd] => 2025-02-26 15:44:05
    [RateCDR] => 1
)
  
[2025-02-26 15:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:44:05' and `end` < '2025-02-26 15:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:44:18] Production.INFO: count ==4734  
[2025-02-26 15:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:44:05 - End Time 2025-02-26 15:44:05  
[2025-02-26 15:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562772', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562772', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:44:20] Production.INFO: ProcessCDR(1,14562772,1,1,2)  
[2025-02-26 15:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562772', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562772', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:44:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:44:25] Production.INFO: ==18567== Releasing lock...  
[2025-02-26 15:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:44:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 15:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:45:05
    [end_date_ymd] => 2025-02-26 15:45:05
    [RateCDR] => 1
)
  
[2025-02-26 15:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:45:05' and `end` < '2025-02-26 15:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:45:18] Production.INFO: count ==4715  
[2025-02-26 15:45:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:45:05 - End Time 2025-02-26 15:45:05  
[2025-02-26 15:45:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562777', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562777', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:45:20] Production.INFO: ProcessCDR(1,14562777,1,1,2)  
[2025-02-26 15:45:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:45:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:45:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:45:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562777', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562777', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:45:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:45:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:45:25] Production.INFO: ==18638== Releasing lock...  
[2025-02-26 15:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:45:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:46:06
    [end_date_ymd] => 2025-02-26 15:46:06
    [RateCDR] => 1
)
  
[2025-02-26 15:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:46:06' and `end` < '2025-02-26 15:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:46:19] Production.INFO: count ==4697  
[2025-02-26 15:46:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:46:06 - End Time 2025-02-26 15:46:06  
[2025-02-26 15:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562782', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562782', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562782', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562782', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:46:21] Production.INFO: ProcessCDR(1,14562782,1,1,2)  
[2025-02-26 15:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:46:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562782', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562782', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:46:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:46:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:46:26] Production.INFO: ==18708== Releasing lock...  
[2025-02-26 15:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:46:26] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:47:05
    [end_date_ymd] => 2025-02-26 15:47:05
    [RateCDR] => 1
)
  
[2025-02-26 15:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:47:05' and `end` < '2025-02-26 15:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:47:18] Production.INFO: count ==4700  
[2025-02-26 15:47:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:47:05 - End Time 2025-02-26 15:47:05  
[2025-02-26 15:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562787', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562787', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562787', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562787', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:47:20] Production.INFO: ProcessCDR(1,14562787,1,1,2)  
[2025-02-26 15:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:47:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562787', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562787', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:47:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:47:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:47:25] Production.INFO: ==18781== Releasing lock...  
[2025-02-26 15:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:47:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:48:05
    [end_date_ymd] => 2025-02-26 15:48:05
    [RateCDR] => 1
)
  
[2025-02-26 15:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:48:05' and `end` < '2025-02-26 15:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:48:18] Production.INFO: count ==4712  
[2025-02-26 15:48:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:48:05 - End Time 2025-02-26 15:48:05  
[2025-02-26 15:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562792', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562792', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562792', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562792', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:48:20] Production.INFO: ProcessCDR(1,14562792,1,1,2)  
[2025-02-26 15:48:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:48:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:48:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:48:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562792', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562792', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:48:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:48:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:48:25] Production.INFO: ==18853== Releasing lock...  
[2025-02-26 15:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:48:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:49:05
    [end_date_ymd] => 2025-02-26 15:49:05
    [RateCDR] => 1
)
  
[2025-02-26 15:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:49:05' and `end` < '2025-02-26 15:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:49:18] Production.INFO: count ==4716  
[2025-02-26 15:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:49:05 - End Time 2025-02-26 15:49:05  
[2025-02-26 15:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562797', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562797', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562797', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562797', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:49:20] Production.INFO: ProcessCDR(1,14562797,1,1,2)  
[2025-02-26 15:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562797', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562797', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:49:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:49:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:49:25] Production.INFO: ==18932== Releasing lock...  
[2025-02-26 15:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:49:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:50:06
    [end_date_ymd] => 2025-02-26 15:50:06
    [RateCDR] => 1
)
  
[2025-02-26 15:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:50:06' and `end` < '2025-02-26 15:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:50:19] Production.INFO: count ==4721  
[2025-02-26 15:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:50:06 - End Time 2025-02-26 15:50:06  
[2025-02-26 15:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562802', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562802', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562802', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562802', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:50:21] Production.INFO: ProcessCDR(1,14562802,1,1,2)  
[2025-02-26 15:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562802', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562802', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:50:26] Production.INFO: ==19005== Releasing lock...  
[2025-02-26 15:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:50:26] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:51:05
    [end_date_ymd] => 2025-02-26 15:51:05
    [RateCDR] => 1
)
  
[2025-02-26 15:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:51:05' and `end` < '2025-02-26 15:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:51:18] Production.INFO: count ==4721  
[2025-02-26 15:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:51:05 - End Time 2025-02-26 15:51:05  
[2025-02-26 15:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562808', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562808', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:51:21] Production.INFO: ProcessCDR(1,14562808,1,1,2)  
[2025-02-26 15:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562808', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562808', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:51:25] Production.INFO: ==19077== Releasing lock...  
[2025-02-26 15:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:51:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:52:05
    [end_date_ymd] => 2025-02-26 15:52:05
    [RateCDR] => 1
)
  
[2025-02-26 15:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:52:05' and `end` < '2025-02-26 15:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:52:18] Production.INFO: count ==4726  
[2025-02-26 15:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:52:05 - End Time 2025-02-26 15:52:05  
[2025-02-26 15:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562813', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562813', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562813', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562813', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:52:20] Production.INFO: ProcessCDR(1,14562813,1,1,2)  
[2025-02-26 15:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562813', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562813', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:52:25] Production.INFO: ==19152== Releasing lock...  
[2025-02-26 15:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:52:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 15:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:53:05
    [end_date_ymd] => 2025-02-26 15:53:05
    [RateCDR] => 1
)
  
[2025-02-26 15:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:53:05' and `end` < '2025-02-26 15:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:53:18] Production.INFO: count ==4705  
[2025-02-26 15:53:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:53:05 - End Time 2025-02-26 15:53:05  
[2025-02-26 15:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562818', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562818', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562818', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562818', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:53:21] Production.INFO: ProcessCDR(1,14562818,1,1,2)  
[2025-02-26 15:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562818', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562818', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:53:26] Production.INFO: ==19226== Releasing lock...  
[2025-02-26 15:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:53:26] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:54:06
    [end_date_ymd] => 2025-02-26 15:54:06
    [RateCDR] => 1
)
  
[2025-02-26 15:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:54:06' and `end` < '2025-02-26 15:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:54:19] Production.INFO: count ==4719  
[2025-02-26 15:54:21] Production.ERROR: pbx CDR StartTime 2025-02-26 12:54:06 - End Time 2025-02-26 15:54:06  
[2025-02-26 15:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562823', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562823', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:54:21] Production.INFO: ProcessCDR(1,14562823,1,1,2)  
[2025-02-26 15:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562823', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562823', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:54:26] Production.INFO: ==19298== Releasing lock...  
[2025-02-26 15:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:54:26] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:55:05
    [end_date_ymd] => 2025-02-26 15:55:05
    [RateCDR] => 1
)
  
[2025-02-26 15:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:55:05' and `end` < '2025-02-26 15:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:55:18] Production.INFO: count ==4731  
[2025-02-26 15:55:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:55:05 - End Time 2025-02-26 15:55:05  
[2025-02-26 15:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562828', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562828', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:55:20] Production.INFO: ProcessCDR(1,14562828,1,1,2)  
[2025-02-26 15:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:55:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:55:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:55:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562828', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562828', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:55:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:55:25] Production.INFO: ==19368== Releasing lock...  
[2025-02-26 15:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:55:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 15:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:56:05
    [end_date_ymd] => 2025-02-26 15:56:05
    [RateCDR] => 1
)
  
[2025-02-26 15:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:56:05' and `end` < '2025-02-26 15:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:56:18] Production.INFO: count ==4729  
[2025-02-26 15:56:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:56:05 - End Time 2025-02-26 15:56:05  
[2025-02-26 15:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562833', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562833', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562833', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562833', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:56:20] Production.INFO: ProcessCDR(1,14562833,1,1,2)  
[2025-02-26 15:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562833', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562833', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:56:25] Production.INFO: ==19443== Releasing lock...  
[2025-02-26 15:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:56:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 15:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:57:05
    [end_date_ymd] => 2025-02-26 15:57:05
    [RateCDR] => 1
)
  
[2025-02-26 15:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:57:05' and `end` < '2025-02-26 15:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:57:18] Production.INFO: count ==4722  
[2025-02-26 15:57:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:57:05 - End Time 2025-02-26 15:57:05  
[2025-02-26 15:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562838', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562838', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562838', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562838', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:57:20] Production.INFO: ProcessCDR(1,14562838,1,1,2)  
[2025-02-26 15:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:57:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:57:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:57:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562838', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562838', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:57:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:57:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:57:24] Production.INFO: ==19551== Releasing lock...  
[2025-02-26 15:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:57:24] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:58:05
    [end_date_ymd] => 2025-02-26 15:58:05
    [RateCDR] => 1
)
  
[2025-02-26 15:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:58:05' and `end` < '2025-02-26 15:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:58:18] Production.INFO: count ==4723  
[2025-02-26 15:58:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:58:05 - End Time 2025-02-26 15:58:05  
[2025-02-26 15:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562843', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562843', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562843', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562843', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:58:20] Production.INFO: ProcessCDR(1,14562843,1,1,2)  
[2025-02-26 15:58:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:58:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562843', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562843', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:58:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:58:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:58:25] Production.INFO: ==19622== Releasing lock...  
[2025-02-26 15:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:58:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 15:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 12:59:05
    [end_date_ymd] => 2025-02-26 15:59:05
    [RateCDR] => 1
)
  
[2025-02-26 15:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 12:59:05' and `end` < '2025-02-26 15:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 15:59:18] Production.INFO: count ==4738  
[2025-02-26 15:59:20] Production.ERROR: pbx CDR StartTime 2025-02-26 12:59:05 - End Time 2025-02-26 15:59:05  
[2025-02-26 15:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562848', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562848', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562848', 'tblTempVendorCDR_20' ) start  
[2025-02-26 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562848', 'tblTempVendorCDR_20' ) end  
[2025-02-26 15:59:20] Production.INFO: ProcessCDR(1,14562848,1,1,2)  
[2025-02-26 15:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:59:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 15:59:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 15:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562848', 'tblTempUsageDetail_20' ) start  
[2025-02-26 15:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562848', 'tblTempUsageDetail_20' ) end  
[2025-02-26 15:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 15:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 15:59:25] Production.INFO: ==19692== Releasing lock...  
[2025-02-26 15:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 15:59:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 16:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:00:06
    [end_date_ymd] => 2025-02-26 16:00:06
    [RateCDR] => 1
)
  
[2025-02-26 16:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:00:06' and `end` < '2025-02-26 16:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:00:19] Production.INFO: count ==4742  
[2025-02-26 16:00:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:00:06 - End Time 2025-02-26 16:00:06  
[2025-02-26 16:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562854', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562854', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:00:22] Production.INFO: ProcessCDR(1,14562854,1,1,2)  
[2025-02-26 16:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:00:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:00:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562854', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562854', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:00:27] Production.INFO: ==19765== Releasing lock...  
[2025-02-26 16:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:00:27] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 16:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:01:05
    [end_date_ymd] => 2025-02-26 16:01:05
    [RateCDR] => 1
)
  
[2025-02-26 16:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:01:05' and `end` < '2025-02-26 16:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:01:17] Production.INFO: count ==4762  
[2025-02-26 16:01:19] Production.ERROR: pbx CDR StartTime 2025-02-26 13:01:05 - End Time 2025-02-26 16:01:05  
[2025-02-26 16:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562859', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562859', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:01:20] Production.INFO: ProcessCDR(1,14562859,1,1,2)  
[2025-02-26 16:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:01:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:01:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:01:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562859', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562859', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:01:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:01:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:01:24] Production.INFO: ==19851== Releasing lock...  
[2025-02-26 16:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:01:24] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:02:05
    [end_date_ymd] => 2025-02-26 16:02:05
    [RateCDR] => 1
)
  
[2025-02-26 16:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:02:05' and `end` < '2025-02-26 16:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:02:18] Production.INFO: count ==4767  
[2025-02-26 16:02:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:02:05 - End Time 2025-02-26 16:02:05  
[2025-02-26 16:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562864', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562864', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562864', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562864', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:02:21] Production.INFO: ProcessCDR(1,14562864,1,1,2)  
[2025-02-26 16:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562864', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562864', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:02:26] Production.INFO: ==19922== Releasing lock...  
[2025-02-26 16:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:02:26] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:03:05
    [end_date_ymd] => 2025-02-26 16:03:05
    [RateCDR] => 1
)
  
[2025-02-26 16:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:03:05' and `end` < '2025-02-26 16:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:03:18] Production.INFO: count ==4761  
[2025-02-26 16:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:03:05 - End Time 2025-02-26 16:03:05  
[2025-02-26 16:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562869', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562869', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562869', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562869', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:03:20] Production.INFO: ProcessCDR(1,14562869,1,1,2)  
[2025-02-26 16:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562869', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562869', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:03:25] Production.INFO: ==19993== Releasing lock...  
[2025-02-26 16:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:03:25] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:04:06
    [end_date_ymd] => 2025-02-26 16:04:06
    [RateCDR] => 1
)
  
[2025-02-26 16:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:04:06' and `end` < '2025-02-26 16:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:04:19] Production.INFO: count ==4760  
[2025-02-26 16:04:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:04:06 - End Time 2025-02-26 16:04:06  
[2025-02-26 16:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562874', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562874', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:04:21] Production.INFO: ProcessCDR(1,14562874,1,1,2)  
[2025-02-26 16:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562874', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562874', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:04:27] Production.INFO: ==20067== Releasing lock...  
[2025-02-26 16:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:04:27] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:05:05
    [end_date_ymd] => 2025-02-26 16:05:05
    [RateCDR] => 1
)
  
[2025-02-26 16:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:05:05' and `end` < '2025-02-26 16:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:05:18] Production.INFO: count ==4758  
[2025-02-26 16:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:05:05 - End Time 2025-02-26 16:05:05  
[2025-02-26 16:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562879', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562879', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:05:21] Production.INFO: ProcessCDR(1,14562879,1,1,2)  
[2025-02-26 16:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:05:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562879', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562879', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:05:26] Production.INFO: ==20136== Releasing lock...  
[2025-02-26 16:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:05:26] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 16:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:06:06
    [end_date_ymd] => 2025-02-26 16:06:06
    [RateCDR] => 1
)
  
[2025-02-26 16:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:06:06' and `end` < '2025-02-26 16:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:06:19] Production.INFO: count ==4775  
[2025-02-26 16:06:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:06:06 - End Time 2025-02-26 16:06:06  
[2025-02-26 16:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562884', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562884', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562884', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562884', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:06:21] Production.INFO: ProcessCDR(1,14562884,1,1,2)  
[2025-02-26 16:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:06:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562884', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562884', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:06:27] Production.INFO: ==20207== Releasing lock...  
[2025-02-26 16:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:06:27] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:07:06
    [end_date_ymd] => 2025-02-26 16:07:06
    [RateCDR] => 1
)
  
[2025-02-26 16:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:07:06' and `end` < '2025-02-26 16:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:07:18] Production.INFO: count ==4790  
[2025-02-26 16:07:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:07:06 - End Time 2025-02-26 16:07:06  
[2025-02-26 16:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562889', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562889', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562889', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562889', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:07:21] Production.INFO: ProcessCDR(1,14562889,1,1,2)  
[2025-02-26 16:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562889', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562889', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:07:26] Production.INFO: ==20280== Releasing lock...  
[2025-02-26 16:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:07:26] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 16:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:08:05
    [end_date_ymd] => 2025-02-26 16:08:05
    [RateCDR] => 1
)
  
[2025-02-26 16:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:08:05' and `end` < '2025-02-26 16:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:08:18] Production.INFO: count ==4799  
[2025-02-26 16:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:08:05 - End Time 2025-02-26 16:08:05  
[2025-02-26 16:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562894', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562894', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562894', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562894', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:08:20] Production.INFO: ProcessCDR(1,14562894,1,1,2)  
[2025-02-26 16:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562894', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562894', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:08:26] Production.INFO: ==20353== Releasing lock...  
[2025-02-26 16:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:08:26] Production.INFO: 64 MB  #Memory Used#   
[2025-02-26 16:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:09:06
    [end_date_ymd] => 2025-02-26 16:09:06
    [RateCDR] => 1
)
  
[2025-02-26 16:09:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:09:06' and `end` < '2025-02-26 16:09:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:09:19] Production.INFO: count ==4805  
[2025-02-26 16:09:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:09:06 - End Time 2025-02-26 16:09:06  
[2025-02-26 16:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562899', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562899', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562899', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562899', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:09:21] Production.INFO: ProcessCDR(1,14562899,1,1,2)  
[2025-02-26 16:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:09:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:09:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562899', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562899', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:09:26] Production.INFO: ==20429== Releasing lock...  
[2025-02-26 16:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:09:26] Production.INFO: 64 MB  #Memory Used#   
[2025-02-26 16:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:10:07
    [end_date_ymd] => 2025-02-26 16:10:07
    [RateCDR] => 1
)
  
[2025-02-26 16:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:10:07' and `end` < '2025-02-26 16:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:10:20] Production.INFO: count ==4800  
[2025-02-26 16:10:22] Production.ERROR: pbx CDR StartTime 2025-02-26 13:10:07 - End Time 2025-02-26 16:10:07  
[2025-02-26 16:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562905', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562905', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:10:22] Production.INFO: ProcessCDR(1,14562905,1,1,2)  
[2025-02-26 16:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:10:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562905', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562905', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:10:28] Production.INFO: ==20504== Releasing lock...  
[2025-02-26 16:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:10:28] Production.INFO: 64 MB  #Memory Used#   
[2025-02-26 16:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:11:06
    [end_date_ymd] => 2025-02-26 16:11:06
    [RateCDR] => 1
)
  
[2025-02-26 16:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:11:06' and `end` < '2025-02-26 16:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:11:19] Production.INFO: count ==4875  
[2025-02-26 16:11:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:11:06 - End Time 2025-02-26 16:11:06  
[2025-02-26 16:11:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562910', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562910', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:11:21] Production.INFO: ProcessCDR(1,14562910,1,1,2)  
[2025-02-26 16:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:11:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:11:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:11:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:11:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562910', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:11:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562910', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:11:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:11:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:11:27] Production.INFO: ==20578== Releasing lock...  
[2025-02-26 16:11:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:11:27] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:12:05
    [end_date_ymd] => 2025-02-26 16:12:05
    [RateCDR] => 1
)
  
[2025-02-26 16:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:12:05' and `end` < '2025-02-26 16:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:12:18] Production.INFO: count ==4879  
[2025-02-26 16:12:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:12:05 - End Time 2025-02-26 16:12:05  
[2025-02-26 16:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562915', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562915', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562915', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562915', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:12:20] Production.INFO: ProcessCDR(1,14562915,1,1,2)  
[2025-02-26 16:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:12:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562915', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562915', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:12:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:12:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:12:25] Production.INFO: ==20649== Releasing lock...  
[2025-02-26 16:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:12:25] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:13:05
    [end_date_ymd] => 2025-02-26 16:13:05
    [RateCDR] => 1
)
  
[2025-02-26 16:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:13:05' and `end` < '2025-02-26 16:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:13:18] Production.INFO: count ==4876  
[2025-02-26 16:13:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:13:05 - End Time 2025-02-26 16:13:05  
[2025-02-26 16:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562920', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562920', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562920', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562920', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:13:21] Production.INFO: ProcessCDR(1,14562920,1,1,2)  
[2025-02-26 16:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562920', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562920', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:13:26] Production.INFO: ==20762== Releasing lock...  
[2025-02-26 16:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:13:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:14:06
    [end_date_ymd] => 2025-02-26 16:14:06
    [RateCDR] => 1
)
  
[2025-02-26 16:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:14:06' and `end` < '2025-02-26 16:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:14:19] Production.INFO: count ==4875  
[2025-02-26 16:14:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:14:06 - End Time 2025-02-26 16:14:06  
[2025-02-26 16:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562925', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562925', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:14:21] Production.INFO: ProcessCDR(1,14562925,1,1,2)  
[2025-02-26 16:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562925', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562925', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:14:26] Production.INFO: ==20832== Releasing lock...  
[2025-02-26 16:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:14:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:15:05
    [end_date_ymd] => 2025-02-26 16:15:05
    [RateCDR] => 1
)
  
[2025-02-26 16:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:15:05' and `end` < '2025-02-26 16:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:15:18] Production.INFO: count ==4873  
[2025-02-26 16:15:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:15:05 - End Time 2025-02-26 16:15:05  
[2025-02-26 16:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562930', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562930', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:15:21] Production.INFO: ProcessCDR(1,14562930,1,1,2)  
[2025-02-26 16:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562930', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562930', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:15:25] Production.INFO: ==20905== Releasing lock...  
[2025-02-26 16:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:15:25] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:16:05
    [end_date_ymd] => 2025-02-26 16:16:05
    [RateCDR] => 1
)
  
[2025-02-26 16:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:16:05' and `end` < '2025-02-26 16:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:16:18] Production.INFO: count ==4869  
[2025-02-26 16:16:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:16:05 - End Time 2025-02-26 16:16:05  
[2025-02-26 16:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562935', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562935', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562935', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562935', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:16:20] Production.INFO: ProcessCDR(1,14562935,1,1,2)  
[2025-02-26 16:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:16:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:16:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:16:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562935', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562935', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:16:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:16:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:16:25] Production.INFO: ==20974== Releasing lock...  
[2025-02-26 16:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:16:25] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:17:05
    [end_date_ymd] => 2025-02-26 16:17:05
    [RateCDR] => 1
)
  
[2025-02-26 16:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:17:05' and `end` < '2025-02-26 16:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:17:18] Production.INFO: count ==4866  
[2025-02-26 16:17:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:17:05 - End Time 2025-02-26 16:17:05  
[2025-02-26 16:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562940', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562940', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562940', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562940', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:17:20] Production.INFO: ProcessCDR(1,14562940,1,1,2)  
[2025-02-26 16:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562940', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562940', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:17:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:17:26] Production.INFO: ==21070== Releasing lock...  
[2025-02-26 16:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:17:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:18:06
    [end_date_ymd] => 2025-02-26 16:18:06
    [RateCDR] => 1
)
  
[2025-02-26 16:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:18:06' and `end` < '2025-02-26 16:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:18:19] Production.INFO: count ==4890  
[2025-02-26 16:18:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:18:06 - End Time 2025-02-26 16:18:06  
[2025-02-26 16:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562945', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562945', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562945', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562945', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:18:21] Production.INFO: ProcessCDR(1,14562945,1,1,2)  
[2025-02-26 16:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:18:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:18:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562945', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562945', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:18:26] Production.INFO: ==21153== Releasing lock...  
[2025-02-26 16:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:18:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:19:06
    [end_date_ymd] => 2025-02-26 16:19:06
    [RateCDR] => 1
)
  
[2025-02-26 16:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:19:06' and `end` < '2025-02-26 16:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:19:19] Production.INFO: count ==4895  
[2025-02-26 16:19:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:19:06 - End Time 2025-02-26 16:19:06  
[2025-02-26 16:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562950', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562950', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562950', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562950', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:19:21] Production.INFO: ProcessCDR(1,14562950,1,1,2)  
[2025-02-26 16:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562950', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562950', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:19:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:19:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:19:27] Production.INFO: ==21226== Releasing lock...  
[2025-02-26 16:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:19:27] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:20:07
    [end_date_ymd] => 2025-02-26 16:20:07
    [RateCDR] => 1
)
  
[2025-02-26 16:20:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:20:07' and `end` < '2025-02-26 16:20:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:20:20] Production.INFO: count ==4898  
[2025-02-26 16:20:22] Production.ERROR: pbx CDR StartTime 2025-02-26 13:20:07 - End Time 2025-02-26 16:20:07  
[2025-02-26 16:20:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562956', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562956', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:20:22] Production.INFO: ProcessCDR(1,14562956,1,1,2)  
[2025-02-26 16:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:20:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:20:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:20:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562956', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562956', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:20:28] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:20:28] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:20:28] Production.INFO: ==21301== Releasing lock...  
[2025-02-26 16:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:20:28] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:21:05
    [end_date_ymd] => 2025-02-26 16:21:05
    [RateCDR] => 1
)
  
[2025-02-26 16:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:21:05' and `end` < '2025-02-26 16:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:21:18] Production.INFO: count ==4924  
[2025-02-26 16:21:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:21:05 - End Time 2025-02-26 16:21:05  
[2025-02-26 16:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562961', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562961', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:21:21] Production.INFO: ProcessCDR(1,14562961,1,1,2)  
[2025-02-26 16:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562961', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562961', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:21:26] Production.INFO: ==21378== Releasing lock...  
[2025-02-26 16:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:21:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:22:05
    [end_date_ymd] => 2025-02-26 16:22:05
    [RateCDR] => 1
)
  
[2025-02-26 16:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:22:05' and `end` < '2025-02-26 16:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:22:18] Production.INFO: count ==4922  
[2025-02-26 16:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:22:05 - End Time 2025-02-26 16:22:05  
[2025-02-26 16:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562966', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562966', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:22:20] Production.INFO: ProcessCDR(1,14562966,1,1,2)  
[2025-02-26 16:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:22:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562966', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562966', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:22:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:22:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:22:25] Production.INFO: ==21448== Releasing lock...  
[2025-02-26 16:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:22:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:23:05
    [end_date_ymd] => 2025-02-26 16:23:05
    [RateCDR] => 1
)
  
[2025-02-26 16:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:23:05' and `end` < '2025-02-26 16:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:23:18] Production.INFO: count ==4913  
[2025-02-26 16:23:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:23:05 - End Time 2025-02-26 16:23:05  
[2025-02-26 16:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562971', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562971', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:23:20] Production.INFO: ProcessCDR(1,14562971,1,1,2)  
[2025-02-26 16:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562971', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562971', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:23:25] Production.INFO: ==21520== Releasing lock...  
[2025-02-26 16:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:23:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:24:06
    [end_date_ymd] => 2025-02-26 16:24:06
    [RateCDR] => 1
)
  
[2025-02-26 16:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:24:06' and `end` < '2025-02-26 16:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:24:19] Production.INFO: count ==4929  
[2025-02-26 16:24:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:24:06 - End Time 2025-02-26 16:24:06  
[2025-02-26 16:24:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562976', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562976', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:24:21] Production.INFO: ProcessCDR(1,14562976,1,1,2)  
[2025-02-26 16:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562976', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562976', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:24:26] Production.INFO: ==21593== Releasing lock...  
[2025-02-26 16:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:24:26] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 16:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:25:05
    [end_date_ymd] => 2025-02-26 16:25:05
    [RateCDR] => 1
)
  
[2025-02-26 16:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:25:05' and `end` < '2025-02-26 16:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:25:18] Production.INFO: count ==4920  
[2025-02-26 16:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:25:05 - End Time 2025-02-26 16:25:05  
[2025-02-26 16:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562981', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562981', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:25:20] Production.INFO: ProcessCDR(1,14562981,1,1,2)  
[2025-02-26 16:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:25:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:25:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562981', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562981', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:25:25] Production.INFO: ==21668== Releasing lock...  
[2025-02-26 16:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:25:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:26:05
    [end_date_ymd] => 2025-02-26 16:26:05
    [RateCDR] => 1
)
  
[2025-02-26 16:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:26:05' and `end` < '2025-02-26 16:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:26:18] Production.INFO: count ==4915  
[2025-02-26 16:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:26:05 - End Time 2025-02-26 16:26:05  
[2025-02-26 16:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562986', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562986', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:26:21] Production.INFO: ProcessCDR(1,14562986,1,1,2)  
[2025-02-26 16:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:26:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562986', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562986', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:26:26] Production.INFO: ==21742== Releasing lock...  
[2025-02-26 16:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:26:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:27:05
    [end_date_ymd] => 2025-02-26 16:27:05
    [RateCDR] => 1
)
  
[2025-02-26 16:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:27:05' and `end` < '2025-02-26 16:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:27:18] Production.INFO: count ==4917  
[2025-02-26 16:27:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:27:05 - End Time 2025-02-26 16:27:05  
[2025-02-26 16:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562991', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562991', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:27:20] Production.INFO: ProcessCDR(1,14562991,1,1,2)  
[2025-02-26 16:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562991', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562991', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:27:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:27:26] Production.INFO: ==21812== Releasing lock...  
[2025-02-26 16:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:27:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:28:06
    [end_date_ymd] => 2025-02-26 16:28:06
    [RateCDR] => 1
)
  
[2025-02-26 16:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:28:06' and `end` < '2025-02-26 16:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:28:19] Production.INFO: count ==4914  
[2025-02-26 16:28:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:28:06 - End Time 2025-02-26 16:28:06  
[2025-02-26 16:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14562996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562996', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14562996', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:28:21] Production.INFO: ProcessCDR(1,14562996,1,1,2)  
[2025-02-26 16:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14562996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:28:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14562996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:28:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14562996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:28:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14562996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562996', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14562996', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:28:26] Production.INFO: ==21927== Releasing lock...  
[2025-02-26 16:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:28:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:29:05
    [end_date_ymd] => 2025-02-26 16:29:05
    [RateCDR] => 1
)
  
[2025-02-26 16:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:29:05' and `end` < '2025-02-26 16:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:29:18] Production.INFO: count ==4920  
[2025-02-26 16:29:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:29:05 - End Time 2025-02-26 16:29:05  
[2025-02-26 16:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563001', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563001', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:29:20] Production.INFO: ProcessCDR(1,14563001,1,1,2)  
[2025-02-26 16:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563001', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563001', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:29:25] Production.INFO: ==22000== Releasing lock...  
[2025-02-26 16:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:29:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:30:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:30:07
    [end_date_ymd] => 2025-02-26 16:30:07
    [RateCDR] => 1
)
  
[2025-02-26 16:30:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:30:07' and `end` < '2025-02-26 16:30:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:30:20] Production.INFO: count ==4918  
[2025-02-26 16:30:22] Production.ERROR: pbx CDR StartTime 2025-02-26 13:30:07 - End Time 2025-02-26 16:30:07  
[2025-02-26 16:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563007', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563007', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:30:22] Production.INFO: ProcessCDR(1,14563007,1,1,2)  
[2025-02-26 16:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:30:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:30:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563007', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563007', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:30:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:30:27] Production.INFO: ==22078== Releasing lock...  
[2025-02-26 16:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:30:27] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:31:05
    [end_date_ymd] => 2025-02-26 16:31:05
    [RateCDR] => 1
)
  
[2025-02-26 16:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:31:05' and `end` < '2025-02-26 16:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:31:18] Production.INFO: count ==4952  
[2025-02-26 16:31:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:31:05 - End Time 2025-02-26 16:31:05  
[2025-02-26 16:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563012', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563012', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:31:20] Production.INFO: ProcessCDR(1,14563012,1,1,2)  
[2025-02-26 16:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563012', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563012', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:31:25] Production.INFO: ==22157== Releasing lock...  
[2025-02-26 16:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:31:25] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 16:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:32:06
    [end_date_ymd] => 2025-02-26 16:32:06
    [RateCDR] => 1
)
  
[2025-02-26 16:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:32:06' and `end` < '2025-02-26 16:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:32:19] Production.INFO: count ==4975  
[2025-02-26 16:32:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:32:06 - End Time 2025-02-26 16:32:06  
[2025-02-26 16:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563017', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563017', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:32:21] Production.INFO: ProcessCDR(1,14563017,1,1,2)  
[2025-02-26 16:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563017', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:32:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563017', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:32:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:32:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:32:27] Production.INFO: ==22234== Releasing lock...  
[2025-02-26 16:32:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:32:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-02-26 16:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:33:05
    [end_date_ymd] => 2025-02-26 16:33:05
    [RateCDR] => 1
)
  
[2025-02-26 16:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:33:05' and `end` < '2025-02-26 16:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:33:18] Production.INFO: count ==4976  
[2025-02-26 16:33:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:33:05 - End Time 2025-02-26 16:33:05  
[2025-02-26 16:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563022', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563022', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:33:20] Production.INFO: ProcessCDR(1,14563022,1,1,2)  
[2025-02-26 16:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563022', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563022', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:33:25] Production.INFO: ==22310== Releasing lock...  
[2025-02-26 16:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:33:25] Production.INFO: 65.25 MB  #Memory Used#   
[2025-02-26 16:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:34:05
    [end_date_ymd] => 2025-02-26 16:34:05
    [RateCDR] => 1
)
  
[2025-02-26 16:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:34:05' and `end` < '2025-02-26 16:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:34:18] Production.INFO: count ==4971  
[2025-02-26 16:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:34:05 - End Time 2025-02-26 16:34:05  
[2025-02-26 16:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563027', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563027', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:34:21] Production.INFO: ProcessCDR(1,14563027,1,1,2)  
[2025-02-26 16:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563027', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563027', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:34:26] Production.INFO: ==22389== Releasing lock...  
[2025-02-26 16:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:34:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-02-26 16:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:35:05
    [end_date_ymd] => 2025-02-26 16:35:05
    [RateCDR] => 1
)
  
[2025-02-26 16:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:35:05' and `end` < '2025-02-26 16:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:35:18] Production.INFO: count ==4967  
[2025-02-26 16:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:35:05 - End Time 2025-02-26 16:35:05  
[2025-02-26 16:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563032', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563032', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:35:20] Production.INFO: ProcessCDR(1,14563032,1,1,2)  
[2025-02-26 16:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:35:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:35:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563032', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563032', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:35:25] Production.INFO: ==22466== Releasing lock...  
[2025-02-26 16:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:35:25] Production.INFO: 65.25 MB  #Memory Used#   
[2025-02-26 16:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:36:06
    [end_date_ymd] => 2025-02-26 16:36:06
    [RateCDR] => 1
)
  
[2025-02-26 16:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:36:06' and `end` < '2025-02-26 16:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:36:19] Production.INFO: count ==4948  
[2025-02-26 16:36:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:36:06 - End Time 2025-02-26 16:36:06  
[2025-02-26 16:36:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563037', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563037', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:36:21] Production.INFO: ProcessCDR(1,14563037,1,1,2)  
[2025-02-26 16:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563037', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563037', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:36:26] Production.INFO: ==22546== Releasing lock...  
[2025-02-26 16:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:36:26] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 16:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:37:05
    [end_date_ymd] => 2025-02-26 16:37:05
    [RateCDR] => 1
)
  
[2025-02-26 16:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:37:05' and `end` < '2025-02-26 16:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:37:18] Production.INFO: count ==4946  
[2025-02-26 16:37:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:37:05 - End Time 2025-02-26 16:37:05  
[2025-02-26 16:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563042', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563042', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:37:20] Production.INFO: ProcessCDR(1,14563042,1,1,2)  
[2025-02-26 16:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:37:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563042', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563042', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:37:25] Production.INFO: ==22621== Releasing lock...  
[2025-02-26 16:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:37:25] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 16:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:38:05
    [end_date_ymd] => 2025-02-26 16:38:05
    [RateCDR] => 1
)
  
[2025-02-26 16:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:38:05' and `end` < '2025-02-26 16:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:38:18] Production.INFO: count ==4924  
[2025-02-26 16:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:38:05 - End Time 2025-02-26 16:38:05  
[2025-02-26 16:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563047', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563047', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:38:20] Production.INFO: ProcessCDR(1,14563047,1,1,2)  
[2025-02-26 16:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563047', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563047', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:38:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:38:26] Production.INFO: ==22693== Releasing lock...  
[2025-02-26 16:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:38:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:39:05
    [end_date_ymd] => 2025-02-26 16:39:05
    [RateCDR] => 1
)
  
[2025-02-26 16:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:39:05' and `end` < '2025-02-26 16:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:39:18] Production.INFO: count ==4901  
[2025-02-26 16:39:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:39:05 - End Time 2025-02-26 16:39:05  
[2025-02-26 16:39:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563052', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563052', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:39:21] Production.INFO: ProcessCDR(1,14563052,1,1,2)  
[2025-02-26 16:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:39:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563052', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563052', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:39:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:39:26] Production.INFO: ==22768== Releasing lock...  
[2025-02-26 16:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:39:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:40:06
    [end_date_ymd] => 2025-02-26 16:40:06
    [RateCDR] => 1
)
  
[2025-02-26 16:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:40:06' and `end` < '2025-02-26 16:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:40:19] Production.INFO: count ==4912  
[2025-02-26 16:40:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:40:06 - End Time 2025-02-26 16:40:06  
[2025-02-26 16:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563058', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563058', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:40:21] Production.INFO: ProcessCDR(1,14563058,1,1,2)  
[2025-02-26 16:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563058', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563058', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:40:26] Production.INFO: ==22849== Releasing lock...  
[2025-02-26 16:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:40:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:41:05
    [end_date_ymd] => 2025-02-26 16:41:05
    [RateCDR] => 1
)
  
[2025-02-26 16:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:41:05' and `end` < '2025-02-26 16:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:41:19] Production.INFO: count ==4926  
[2025-02-26 16:41:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:41:05 - End Time 2025-02-26 16:41:05  
[2025-02-26 16:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:41:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:41:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563063', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:41:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563063', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:41:22] Production.INFO: ProcessCDR(1,14563063,1,1,2)  
[2025-02-26 16:41:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:41:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:41:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563063', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:41:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563063', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:41:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:41:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:41:27] Production.INFO: ==22926== Releasing lock...  
[2025-02-26 16:41:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:41:27] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 16:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:42:05
    [end_date_ymd] => 2025-02-26 16:42:05
    [RateCDR] => 1
)
  
[2025-02-26 16:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:42:05' and `end` < '2025-02-26 16:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:42:19] Production.INFO: count ==4923  
[2025-02-26 16:42:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:42:05 - End Time 2025-02-26 16:42:05  
[2025-02-26 16:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563068', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563068', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:42:21] Production.INFO: ProcessCDR(1,14563068,1,1,2)  
[2025-02-26 16:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:42:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:42:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563068', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563068', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:42:26] Production.INFO: ==23000== Releasing lock...  
[2025-02-26 16:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:42:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:43:06
    [end_date_ymd] => 2025-02-26 16:43:06
    [RateCDR] => 1
)
  
[2025-02-26 16:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:43:06' and `end` < '2025-02-26 16:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:43:19] Production.INFO: count ==4921  
[2025-02-26 16:43:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:43:06 - End Time 2025-02-26 16:43:06  
[2025-02-26 16:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563073', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563073', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:43:21] Production.INFO: ProcessCDR(1,14563073,1,1,2)  
[2025-02-26 16:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:43:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563073', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563073', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:43:26] Production.INFO: ==23076== Releasing lock...  
[2025-02-26 16:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:43:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:44:05
    [end_date_ymd] => 2025-02-26 16:44:05
    [RateCDR] => 1
)
  
[2025-02-26 16:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:44:05' and `end` < '2025-02-26 16:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:44:18] Production.INFO: count ==4911  
[2025-02-26 16:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:44:05 - End Time 2025-02-26 16:44:05  
[2025-02-26 16:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563078', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563078', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:44:20] Production.INFO: ProcessCDR(1,14563078,1,1,2)  
[2025-02-26 16:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563078', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563078', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:44:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:44:25] Production.INFO: ==23187== Releasing lock...  
[2025-02-26 16:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:44:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:45:05
    [end_date_ymd] => 2025-02-26 16:45:05
    [RateCDR] => 1
)
  
[2025-02-26 16:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:45:05' and `end` < '2025-02-26 16:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:45:20] Production.INFO: count ==4900  
[2025-02-26 16:45:22] Production.ERROR: pbx CDR StartTime 2025-02-26 13:45:05 - End Time 2025-02-26 16:45:05  
[2025-02-26 16:45:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563083', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563083', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:45:22] Production.INFO: ProcessCDR(1,14563083,1,1,2)  
[2025-02-26 16:45:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:45:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563083', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563083', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:45:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:45:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:45:27] Production.INFO: ==23266== Releasing lock...  
[2025-02-26 16:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:45:27] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:46:05
    [end_date_ymd] => 2025-02-26 16:46:05
    [RateCDR] => 1
)
  
[2025-02-26 16:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:46:05' and `end` < '2025-02-26 16:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:46:18] Production.INFO: count ==4897  
[2025-02-26 16:46:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:46:05 - End Time 2025-02-26 16:46:05  
[2025-02-26 16:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563088', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563088', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:46:21] Production.INFO: ProcessCDR(1,14563088,1,1,2)  
[2025-02-26 16:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563088', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563088', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:46:26] Production.INFO: ==23339== Releasing lock...  
[2025-02-26 16:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:46:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:47:05
    [end_date_ymd] => 2025-02-26 16:47:05
    [RateCDR] => 1
)
  
[2025-02-26 16:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:47:05' and `end` < '2025-02-26 16:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:47:19] Production.INFO: count ==4887  
[2025-02-26 16:47:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:47:05 - End Time 2025-02-26 16:47:05  
[2025-02-26 16:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563093', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563093', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:47:21] Production.INFO: ProcessCDR(1,14563093,1,1,2)  
[2025-02-26 16:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:47:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:47:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563093', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563093', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:47:26] Production.INFO: ==23420== Releasing lock...  
[2025-02-26 16:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:47:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:48:05
    [end_date_ymd] => 2025-02-26 16:48:05
    [RateCDR] => 1
)
  
[2025-02-26 16:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:48:05' and `end` < '2025-02-26 16:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:48:19] Production.INFO: count ==4892  
[2025-02-26 16:48:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:48:05 - End Time 2025-02-26 16:48:05  
[2025-02-26 16:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563098', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563098', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:48:21] Production.INFO: ProcessCDR(1,14563098,1,1,2)  
[2025-02-26 16:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563098', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563098', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:48:26] Production.INFO: ==23499== Releasing lock...  
[2025-02-26 16:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:48:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:49:05
    [end_date_ymd] => 2025-02-26 16:49:05
    [RateCDR] => 1
)
  
[2025-02-26 16:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:49:05' and `end` < '2025-02-26 16:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:49:18] Production.INFO: count ==4904  
[2025-02-26 16:49:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:49:05 - End Time 2025-02-26 16:49:05  
[2025-02-26 16:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563103', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563103', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:49:20] Production.INFO: ProcessCDR(1,14563103,1,1,2)  
[2025-02-26 16:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:49:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:49:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563103', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563103', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:49:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:49:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:49:25] Production.INFO: ==23577== Releasing lock...  
[2025-02-26 16:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:49:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:50:06
    [end_date_ymd] => 2025-02-26 16:50:06
    [RateCDR] => 1
)
  
[2025-02-26 16:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:50:06' and `end` < '2025-02-26 16:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:50:19] Production.INFO: count ==4896  
[2025-02-26 16:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:50:06 - End Time 2025-02-26 16:50:06  
[2025-02-26 16:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563109', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563109', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:50:21] Production.INFO: ProcessCDR(1,14563109,1,1,2)  
[2025-02-26 16:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:50:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:50:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:50:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:50:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:50:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:50:24] Production.INFO: ==23657== Releasing lock...  
[2025-02-26 16:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:50:24] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:51:05
    [end_date_ymd] => 2025-02-26 16:51:05
    [RateCDR] => 1
)
  
[2025-02-26 16:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:51:05' and `end` < '2025-02-26 16:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:51:18] Production.INFO: count ==4913  
[2025-02-26 16:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:51:05 - End Time 2025-02-26 16:51:05  
[2025-02-26 16:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563114', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563114', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:51:20] Production.INFO: ProcessCDR(1,14563114,1,1,2)  
[2025-02-26 16:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563114', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563114', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:51:25] Production.INFO: ==23732== Releasing lock...  
[2025-02-26 16:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:51:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:52:05
    [end_date_ymd] => 2025-02-26 16:52:05
    [RateCDR] => 1
)
  
[2025-02-26 16:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:52:05' and `end` < '2025-02-26 16:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:52:18] Production.INFO: count ==4896  
[2025-02-26 16:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:52:05 - End Time 2025-02-26 16:52:05  
[2025-02-26 16:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563119', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563119', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:52:20] Production.INFO: ProcessCDR(1,14563119,1,1,2)  
[2025-02-26 16:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563119', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563119', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:52:26] Production.INFO: ==23809== Releasing lock...  
[2025-02-26 16:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:52:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:53:05
    [end_date_ymd] => 2025-02-26 16:53:05
    [RateCDR] => 1
)
  
[2025-02-26 16:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:53:05' and `end` < '2025-02-26 16:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:53:19] Production.INFO: count ==4897  
[2025-02-26 16:53:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:53:05 - End Time 2025-02-26 16:53:05  
[2025-02-26 16:53:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563124', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563124', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:53:21] Production.INFO: ProcessCDR(1,14563124,1,1,2)  
[2025-02-26 16:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563124', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563124', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:53:26] Production.INFO: ==23887== Releasing lock...  
[2025-02-26 16:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:53:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:54:05
    [end_date_ymd] => 2025-02-26 16:54:05
    [RateCDR] => 1
)
  
[2025-02-26 16:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:54:05' and `end` < '2025-02-26 16:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:54:18] Production.INFO: count ==4916  
[2025-02-26 16:54:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:54:05 - End Time 2025-02-26 16:54:05  
[2025-02-26 16:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563129', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563129', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:54:20] Production.INFO: ProcessCDR(1,14563129,1,1,2)  
[2025-02-26 16:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563129', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563129', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:54:25] Production.INFO: ==23960== Releasing lock...  
[2025-02-26 16:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:54:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:55:06
    [end_date_ymd] => 2025-02-26 16:55:06
    [RateCDR] => 1
)
  
[2025-02-26 16:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:55:06' and `end` < '2025-02-26 16:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:55:19] Production.INFO: count ==4886  
[2025-02-26 16:55:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:55:06 - End Time 2025-02-26 16:55:06  
[2025-02-26 16:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563134', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563134', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:55:21] Production.INFO: ProcessCDR(1,14563134,1,1,2)  
[2025-02-26 16:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:55:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:55:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563134', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563134', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:55:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:55:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:55:26] Production.INFO: ==24033== Releasing lock...  
[2025-02-26 16:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:55:26] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 16:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:56:05
    [end_date_ymd] => 2025-02-26 16:56:05
    [RateCDR] => 1
)
  
[2025-02-26 16:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:56:05' and `end` < '2025-02-26 16:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:56:18] Production.INFO: count ==4900  
[2025-02-26 16:56:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:56:05 - End Time 2025-02-26 16:56:05  
[2025-02-26 16:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563139', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563139', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:56:20] Production.INFO: ProcessCDR(1,14563139,1,1,2)  
[2025-02-26 16:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563139', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563139', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:56:25] Production.INFO: ==24112== Releasing lock...  
[2025-02-26 16:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:56:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:57:05
    [end_date_ymd] => 2025-02-26 16:57:05
    [RateCDR] => 1
)
  
[2025-02-26 16:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:57:05' and `end` < '2025-02-26 16:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:57:18] Production.INFO: count ==4900  
[2025-02-26 16:57:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:57:05 - End Time 2025-02-26 16:57:05  
[2025-02-26 16:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563144', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563144', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:57:20] Production.INFO: ProcessCDR(1,14563144,1,1,2)  
[2025-02-26 16:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:57:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:57:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:57:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563144', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563144', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:57:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:57:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:57:25] Production.INFO: ==24187== Releasing lock...  
[2025-02-26 16:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:57:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:58:06
    [end_date_ymd] => 2025-02-26 16:58:06
    [RateCDR] => 1
)
  
[2025-02-26 16:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:58:06' and `end` < '2025-02-26 16:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:58:19] Production.INFO: count ==4900  
[2025-02-26 16:58:21] Production.ERROR: pbx CDR StartTime 2025-02-26 13:58:06 - End Time 2025-02-26 16:58:06  
[2025-02-26 16:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563149', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563149', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:58:21] Production.INFO: ProcessCDR(1,14563149,1,1,2)  
[2025-02-26 16:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563149', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563149', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:58:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:58:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:58:26] Production.INFO: ==24266== Releasing lock...  
[2025-02-26 16:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:58:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 16:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 13:59:06
    [end_date_ymd] => 2025-02-26 16:59:06
    [RateCDR] => 1
)
  
[2025-02-26 16:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 13:59:06' and `end` < '2025-02-26 16:59:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 16:59:18] Production.INFO: count ==4896  
[2025-02-26 16:59:20] Production.ERROR: pbx CDR StartTime 2025-02-26 13:59:06 - End Time 2025-02-26 16:59:06  
[2025-02-26 16:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 16:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563154', 'tblTempVendorCDR_20' ) start  
[2025-02-26 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563154', 'tblTempVendorCDR_20' ) end  
[2025-02-26 16:59:21] Production.INFO: ProcessCDR(1,14563154,1,1,2)  
[2025-02-26 16:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 16:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 16:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563154', 'tblTempUsageDetail_20' ) start  
[2025-02-26 16:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563154', 'tblTempUsageDetail_20' ) end  
[2025-02-26 16:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 16:59:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 16:59:26] Production.INFO: ==24382== Releasing lock...  
[2025-02-26 16:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 16:59:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 17:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:00:07
    [end_date_ymd] => 2025-02-26 17:00:07
    [RateCDR] => 1
)
  
[2025-02-26 17:00:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:00:07' and `end` < '2025-02-26 17:00:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:00:20] Production.INFO: count ==4896  
[2025-02-26 17:00:22] Production.ERROR: pbx CDR StartTime 2025-02-26 14:00:07 - End Time 2025-02-26 17:00:07  
[2025-02-26 17:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563159', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563159', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563159', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563159', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:00:22] Production.INFO: ProcessCDR(1,14563159,1,1,2)  
[2025-02-26 17:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:00:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:00:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:00:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563159', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563159', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:00:27] Production.INFO: ==24462== Releasing lock...  
[2025-02-26 17:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:00:27] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 17:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:01:06
    [end_date_ymd] => 2025-02-26 17:01:06
    [RateCDR] => 1
)
  
[2025-02-26 17:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:01:06' and `end` < '2025-02-26 17:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:01:18] Production.INFO: count ==4936  
[2025-02-26 17:01:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:01:06 - End Time 2025-02-26 17:01:06  
[2025-02-26 17:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563165', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563165', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:01:20] Production.INFO: ProcessCDR(1,14563165,1,1,2)  
[2025-02-26 17:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:01:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563165', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563165', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:01:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:01:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:01:25] Production.INFO: ==24555== Releasing lock...  
[2025-02-26 17:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:01:25] Production.INFO: 65 MB  #Memory Used#   
[2025-02-26 17:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:02:05
    [end_date_ymd] => 2025-02-26 17:02:05
    [RateCDR] => 1
)
  
[2025-02-26 17:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:02:05' and `end` < '2025-02-26 17:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:02:18] Production.INFO: count ==4896  
[2025-02-26 17:02:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:02:05 - End Time 2025-02-26 17:02:05  
[2025-02-26 17:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563170', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563170', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:02:20] Production.INFO: ProcessCDR(1,14563170,1,1,2)  
[2025-02-26 17:02:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:02:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563170', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563170', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:02:25] Production.INFO: ==24630== Releasing lock...  
[2025-02-26 17:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:02:25] Production.INFO: 64.75 MB  #Memory Used#   
[2025-02-26 17:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:03:05
    [end_date_ymd] => 2025-02-26 17:03:05
    [RateCDR] => 1
)
  
[2025-02-26 17:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:03:05' and `end` < '2025-02-26 17:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:03:18] Production.INFO: count ==4871  
[2025-02-26 17:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:03:05 - End Time 2025-02-26 17:03:05  
[2025-02-26 17:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563175', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563175', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:03:20] Production.INFO: ProcessCDR(1,14563175,1,1,2)  
[2025-02-26 17:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:03:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:03:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563175', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563175', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:03:25] Production.INFO: ==24710== Releasing lock...  
[2025-02-26 17:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:03:25] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 17:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:04:05
    [end_date_ymd] => 2025-02-26 17:04:05
    [RateCDR] => 1
)
  
[2025-02-26 17:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:04:05' and `end` < '2025-02-26 17:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:04:18] Production.INFO: count ==4869  
[2025-02-26 17:04:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:04:05 - End Time 2025-02-26 17:04:05  
[2025-02-26 17:04:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563180', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563180', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:04:20] Production.INFO: ProcessCDR(1,14563180,1,1,2)  
[2025-02-26 17:04:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:04:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563180', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563180', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:04:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:04:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:04:25] Production.INFO: ==24783== Releasing lock...  
[2025-02-26 17:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:04:25] Production.INFO: 64.5 MB  #Memory Used#   
[2025-02-26 17:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:05:05
    [end_date_ymd] => 2025-02-26 17:05:05
    [RateCDR] => 1
)
  
[2025-02-26 17:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:05:05' and `end` < '2025-02-26 17:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:05:18] Production.INFO: count ==4858  
[2025-02-26 17:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:05:05 - End Time 2025-02-26 17:05:05  
[2025-02-26 17:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563185', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563185', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:05:20] Production.INFO: ProcessCDR(1,14563185,1,1,2)  
[2025-02-26 17:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:05:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563185', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563185', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:05:25] Production.INFO: ==24859== Releasing lock...  
[2025-02-26 17:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:05:25] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:06:05
    [end_date_ymd] => 2025-02-26 17:06:05
    [RateCDR] => 1
)
  
[2025-02-26 17:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:06:05' and `end` < '2025-02-26 17:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:06:18] Production.INFO: count ==4844  
[2025-02-26 17:06:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:06:05 - End Time 2025-02-26 17:06:05  
[2025-02-26 17:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563190', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563190', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:06:20] Production.INFO: ProcessCDR(1,14563190,1,1,2)  
[2025-02-26 17:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563190', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563190', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:06:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:06:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:06:25] Production.INFO: ==24935== Releasing lock...  
[2025-02-26 17:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:06:25] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:07:05
    [end_date_ymd] => 2025-02-26 17:07:05
    [RateCDR] => 1
)
  
[2025-02-26 17:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:07:05' and `end` < '2025-02-26 17:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:07:18] Production.INFO: count ==4849  
[2025-02-26 17:07:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:07:05 - End Time 2025-02-26 17:07:05  
[2025-02-26 17:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563195', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563195', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563195', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563195', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:07:20] Production.INFO: ProcessCDR(1,14563195,1,1,2)  
[2025-02-26 17:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563195', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563195', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:07:24] Production.INFO: ==25011== Releasing lock...  
[2025-02-26 17:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:07:24] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:08:05
    [end_date_ymd] => 2025-02-26 17:08:05
    [RateCDR] => 1
)
  
[2025-02-26 17:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:08:05' and `end` < '2025-02-26 17:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:08:18] Production.INFO: count ==4845  
[2025-02-26 17:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:08:05 - End Time 2025-02-26 17:08:05  
[2025-02-26 17:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563200', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563200', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563200', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563200', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:08:20] Production.INFO: ProcessCDR(1,14563200,1,1,2)  
[2025-02-26 17:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563200', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563200', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:08:25] Production.INFO: ==25089== Releasing lock...  
[2025-02-26 17:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:08:25] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:09:05
    [end_date_ymd] => 2025-02-26 17:09:05
    [RateCDR] => 1
)
  
[2025-02-26 17:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:09:05' and `end` < '2025-02-26 17:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:09:18] Production.INFO: count ==4836  
[2025-02-26 17:09:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:09:05 - End Time 2025-02-26 17:09:05  
[2025-02-26 17:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563205', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563205', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563205', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563205', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:09:20] Production.INFO: ProcessCDR(1,14563205,1,1,2)  
[2025-02-26 17:09:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:09:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:09:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:09:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563205', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563205', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:09:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:09:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:09:25] Production.INFO: ==25163== Releasing lock...  
[2025-02-26 17:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:09:25] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:10:07
    [end_date_ymd] => 2025-02-26 17:10:07
    [RateCDR] => 1
)
  
[2025-02-26 17:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:10:07' and `end` < '2025-02-26 17:10:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:10:19] Production.INFO: count ==4825  
[2025-02-26 17:10:21] Production.ERROR: pbx CDR StartTime 2025-02-26 14:10:07 - End Time 2025-02-26 17:10:07  
[2025-02-26 17:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563211', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563211', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:10:21] Production.INFO: ProcessCDR(1,14563211,1,1,2)  
[2025-02-26 17:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:10:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563211', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563211', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:10:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:10:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:10:26] Production.INFO: ==25445== Releasing lock...  
[2025-02-26 17:10:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:10:26] Production.INFO: 64.25 MB  #Memory Used#   
[2025-02-26 17:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:11:05
    [end_date_ymd] => 2025-02-26 17:11:05
    [RateCDR] => 1
)
  
[2025-02-26 17:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:11:05' and `end` < '2025-02-26 17:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:11:18] Production.INFO: count ==4761  
[2025-02-26 17:11:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:11:05 - End Time 2025-02-26 17:11:05  
[2025-02-26 17:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563216', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563216', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:11:20] Production.INFO: ProcessCDR(1,14563216,1,1,2)  
[2025-02-26 17:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:11:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:11:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:11:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563216', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563216', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:11:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:11:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:11:24] Production.INFO: ==25524== Releasing lock...  
[2025-02-26 17:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:11:24] Production.INFO: 63.75 MB  #Memory Used#   
[2025-02-26 17:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:12:05
    [end_date_ymd] => 2025-02-26 17:12:05
    [RateCDR] => 1
)
  
[2025-02-26 17:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:12:05' and `end` < '2025-02-26 17:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:12:18] Production.INFO: count ==4743  
[2025-02-26 17:12:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:12:05 - End Time 2025-02-26 17:12:05  
[2025-02-26 17:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563221', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563221', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:12:20] Production.INFO: ProcessCDR(1,14563221,1,1,2)  
[2025-02-26 17:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:12:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563221', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563221', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:12:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:12:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:12:25] Production.INFO: ==25596== Releasing lock...  
[2025-02-26 17:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:12:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:13:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:13:06
    [end_date_ymd] => 2025-02-26 17:13:06
    [RateCDR] => 1
)
  
[2025-02-26 17:13:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:13:06' and `end` < '2025-02-26 17:13:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:13:18] Production.INFO: count ==4742  
[2025-02-26 17:13:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:13:06 - End Time 2025-02-26 17:13:06  
[2025-02-26 17:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563226', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563226', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:13:20] Production.INFO: ProcessCDR(1,14563226,1,1,2)  
[2025-02-26 17:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:13:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563226', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563226', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:13:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:13:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:13:24] Production.INFO: ==25781== Releasing lock...  
[2025-02-26 17:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:13:24] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:14:05
    [end_date_ymd] => 2025-02-26 17:14:05
    [RateCDR] => 1
)
  
[2025-02-26 17:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:14:05' and `end` < '2025-02-26 17:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:14:18] Production.INFO: count ==4743  
[2025-02-26 17:14:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:14:05 - End Time 2025-02-26 17:14:05  
[2025-02-26 17:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563231', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563231', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:14:20] Production.INFO: ProcessCDR(1,14563231,1,1,2)  
[2025-02-26 17:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563231', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563231', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:14:25] Production.INFO: ==25953== Releasing lock...  
[2025-02-26 17:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:14:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:15:05
    [end_date_ymd] => 2025-02-26 17:15:05
    [RateCDR] => 1
)
  
[2025-02-26 17:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:15:05' and `end` < '2025-02-26 17:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:15:17] Production.INFO: count ==4743  
[2025-02-26 17:15:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:15:05 - End Time 2025-02-26 17:15:05  
[2025-02-26 17:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563236', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563236', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:15:19] Production.INFO: ProcessCDR(1,14563236,1,1,2)  
[2025-02-26 17:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:15:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:15:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563236', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563236', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:15:23] Production.INFO: ==26073== Releasing lock...  
[2025-02-26 17:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:15:23] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:16:06
    [end_date_ymd] => 2025-02-26 17:16:06
    [RateCDR] => 1
)
  
[2025-02-26 17:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:16:06' and `end` < '2025-02-26 17:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:16:18] Production.INFO: count ==4746  
[2025-02-26 17:16:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:16:06 - End Time 2025-02-26 17:16:06  
[2025-02-26 17:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563241', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563241', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563241', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563241', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:16:20] Production.INFO: ProcessCDR(1,14563241,1,1,2)  
[2025-02-26 17:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:16:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563241', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563241', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:16:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:16:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:16:25] Production.INFO: ==26156== Releasing lock...  
[2025-02-26 17:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:16:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:17:06
    [end_date_ymd] => 2025-02-26 17:17:06
    [RateCDR] => 1
)
  
[2025-02-26 17:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:17:06' and `end` < '2025-02-26 17:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:17:19] Production.INFO: count ==4737  
[2025-02-26 17:17:21] Production.ERROR: pbx CDR StartTime 2025-02-26 14:17:06 - End Time 2025-02-26 17:17:06  
[2025-02-26 17:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563246', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563246', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563246', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563246', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:17:21] Production.INFO: ProcessCDR(1,14563246,1,1,2)  
[2025-02-26 17:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:17:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563246', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563246', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:17:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:17:26] Production.INFO: ==26232== Releasing lock...  
[2025-02-26 17:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:17:26] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:18:05
    [end_date_ymd] => 2025-02-26 17:18:05
    [RateCDR] => 1
)
  
[2025-02-26 17:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:18:05' and `end` < '2025-02-26 17:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:18:18] Production.INFO: count ==4726  
[2025-02-26 17:18:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:18:05 - End Time 2025-02-26 17:18:05  
[2025-02-26 17:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563251', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563251', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563251', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563251', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:18:20] Production.INFO: ProcessCDR(1,14563251,1,1,2)  
[2025-02-26 17:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:18:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:18:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563251', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563251', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:18:25] Production.INFO: ==26313== Releasing lock...  
[2025-02-26 17:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:18:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-02-26 17:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:19:06
    [end_date_ymd] => 2025-02-26 17:19:06
    [RateCDR] => 1
)
  
[2025-02-26 17:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:19:06' and `end` < '2025-02-26 17:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:19:18] Production.INFO: count ==4717  
[2025-02-26 17:19:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:19:06 - End Time 2025-02-26 17:19:06  
[2025-02-26 17:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563256', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563256', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563256', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563256', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:19:20] Production.INFO: ProcessCDR(1,14563256,1,1,2)  
[2025-02-26 17:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:19:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:19:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:19:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563256', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563256', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:19:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:19:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:19:24] Production.INFO: ==26390== Releasing lock...  
[2025-02-26 17:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:19:24] Production.INFO: 63.25 MB  #Memory Used#   
[2025-02-26 17:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:20:06
    [end_date_ymd] => 2025-02-26 17:20:06
    [RateCDR] => 1
)
  
[2025-02-26 17:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:20:06' and `end` < '2025-02-26 17:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:20:19] Production.INFO: count ==4691  
[2025-02-26 17:20:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:20:06 - End Time 2025-02-26 17:20:06  
[2025-02-26 17:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563262', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563262', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:20:21] Production.INFO: ProcessCDR(1,14563262,1,1,2)  
[2025-02-26 17:20:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:20:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:20:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:20:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563262', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563262', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:20:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:20:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:20:24] Production.INFO: ==26467== Releasing lock...  
[2025-02-26 17:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:20:24] Production.INFO: 63 MB  #Memory Used#   
[2025-02-26 17:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:21:05
    [end_date_ymd] => 2025-02-26 17:21:05
    [RateCDR] => 1
)
  
[2025-02-26 17:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:21:05' and `end` < '2025-02-26 17:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:21:18] Production.INFO: count ==4657  
[2025-02-26 17:21:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:21:05 - End Time 2025-02-26 17:21:05  
[2025-02-26 17:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563267', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563267', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:21:20] Production.INFO: ProcessCDR(1,14563267,1,1,2)  
[2025-02-26 17:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:21:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:21:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:21:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563267', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563267', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:21:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:21:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:21:23] Production.INFO: ==26545== Releasing lock...  
[2025-02-26 17:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:21:23] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 17:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:22:05
    [end_date_ymd] => 2025-02-26 17:22:05
    [RateCDR] => 1
)
  
[2025-02-26 17:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:22:05' and `end` < '2025-02-26 17:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:22:18] Production.INFO: count ==4629  
[2025-02-26 17:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:22:05 - End Time 2025-02-26 17:22:05  
[2025-02-26 17:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563272', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563272', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:22:20] Production.INFO: ProcessCDR(1,14563272,1,1,2)  
[2025-02-26 17:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563272', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563272', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:22:23] Production.INFO: ==26616== Releasing lock...  
[2025-02-26 17:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:22:23] Production.INFO: 62.75 MB  #Memory Used#   
[2025-02-26 17:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:23:06
    [end_date_ymd] => 2025-02-26 17:23:06
    [RateCDR] => 1
)
  
[2025-02-26 17:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:23:06' and `end` < '2025-02-26 17:23:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:23:18] Production.INFO: count ==4598  
[2025-02-26 17:23:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:23:06 - End Time 2025-02-26 17:23:06  
[2025-02-26 17:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563277', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563277', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:23:20] Production.INFO: ProcessCDR(1,14563277,1,1,2)  
[2025-02-26 17:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:23:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:23:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:23:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563277', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563277', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:23:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:23:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:23:24] Production.INFO: ==26689== Releasing lock...  
[2025-02-26 17:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:23:24] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 17:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:24:05
    [end_date_ymd] => 2025-02-26 17:24:05
    [RateCDR] => 1
)
  
[2025-02-26 17:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:24:05' and `end` < '2025-02-26 17:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:24:18] Production.INFO: count ==4596  
[2025-02-26 17:24:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:24:05 - End Time 2025-02-26 17:24:05  
[2025-02-26 17:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563282', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563282', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:24:20] Production.INFO: ProcessCDR(1,14563282,1,1,2)  
[2025-02-26 17:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563282', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563282', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:24:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:24:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:24:25] Production.INFO: ==26764== Releasing lock...  
[2025-02-26 17:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:24:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 17:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:25:05
    [end_date_ymd] => 2025-02-26 17:25:05
    [RateCDR] => 1
)
  
[2025-02-26 17:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:25:05' and `end` < '2025-02-26 17:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:25:18] Production.INFO: count ==4613  
[2025-02-26 17:25:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:25:05 - End Time 2025-02-26 17:25:05  
[2025-02-26 17:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563287', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563287', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:25:20] Production.INFO: ProcessCDR(1,14563287,1,1,2)  
[2025-02-26 17:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:25:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:25:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:25:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563287', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563287', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:25:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:25:25] Production.INFO: ==26837== Releasing lock...  
[2025-02-26 17:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:25:25] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 17:26:22] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:26:22
    [end_date_ymd] => 2025-02-26 17:26:22
    [RateCDR] => 1
)
  
[2025-02-26 17:26:22] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:26:22' and `end` < '2025-02-26 17:26:22'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:26:34] Production.INFO: count ==4600  
[2025-02-26 17:27:39] Production.ERROR: pbx CDR StartTime 2025-02-26 14:26:22 - End Time 2025-02-26 17:26:22  
[2025-02-26 17:27:39] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:27:39] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563292', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:27:44] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563292', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:27:44] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563292', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:27:44] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563292', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:27:44] Production.INFO: ProcessCDR(1,14563292,1,1,2)  
[2025-02-26 17:27:44] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:27:50] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:27:50] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:28:19] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:28:19] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563292', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563292', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:28:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:28:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:28:26] Production.INFO: ==26916== Releasing lock...  
[2025-02-26 17:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:28:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-02-26 17:29:20] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:29:20
    [end_date_ymd] => 2025-02-26 17:29:20
    [RateCDR] => 1
)
  
[2025-02-26 17:29:20] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:29:20' and `end` < '2025-02-26 17:29:20'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:29:32] Production.INFO: count ==4587  
[2025-02-26 17:30:09] Production.ERROR: pbx CDR StartTime 2025-02-26 14:29:20 - End Time 2025-02-26 17:29:20  
[2025-02-26 17:30:09] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:30:09] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:30:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:30:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563303', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:30:16] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563303', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:30:16] Production.INFO: ProcessCDR(1,14563303,1,1,2)  
[2025-02-26 17:30:16] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:30:28] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:30:28] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:30:44] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:30:44] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563303', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:30:47] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563303', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:30:47] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:30:47] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:30:49] Production.INFO: ==27122== Releasing lock...  
[2025-02-26 17:30:49] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:30:49] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 17:31:18] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:31:18
    [end_date_ymd] => 2025-02-26 17:31:18
    [RateCDR] => 1
)
  
[2025-02-26 17:31:18] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:31:18' and `end` < '2025-02-26 17:31:18'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:31:31] Production.INFO: count ==4582  
[2025-02-26 17:31:33] Production.ERROR: pbx CDR StartTime 2025-02-26 14:31:18 - End Time 2025-02-26 17:31:18  
[2025-02-26 17:31:33] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:31:33] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563312', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:31:33] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563312', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:31:33] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563312', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:31:33] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563312', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:31:33] Production.INFO: ProcessCDR(1,14563312,1,1,2)  
[2025-02-26 17:31:33] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:31:34] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:31:34] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:31:36] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:31:36] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563312', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:31:37] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563312', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:31:37] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:31:37] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:31:37] Production.INFO: ==27316== Releasing lock...  
[2025-02-26 17:31:37] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:31:37] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 17:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:32:05
    [end_date_ymd] => 2025-02-26 17:32:05
    [RateCDR] => 1
)
  
[2025-02-26 17:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:32:05' and `end` < '2025-02-26 17:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:32:18] Production.INFO: count ==4578  
[2025-02-26 17:32:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:32:05 - End Time 2025-02-26 17:32:05  
[2025-02-26 17:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563317', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563317', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563317', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563317', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:32:20] Production.INFO: ProcessCDR(1,14563317,1,1,2)  
[2025-02-26 17:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563317', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563317', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:32:25] Production.INFO: ==27421== Releasing lock...  
[2025-02-26 17:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:32:25] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 17:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:33:05
    [end_date_ymd] => 2025-02-26 17:33:05
    [RateCDR] => 1
)
  
[2025-02-26 17:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:33:05' and `end` < '2025-02-26 17:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:33:18] Production.INFO: count ==4574  
[2025-02-26 17:33:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:33:05 - End Time 2025-02-26 17:33:05  
[2025-02-26 17:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563322', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563322', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563322', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563322', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:33:20] Production.INFO: ProcessCDR(1,14563322,1,1,2)  
[2025-02-26 17:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563322', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563322', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:33:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:33:25] Production.INFO: ==27517== Releasing lock...  
[2025-02-26 17:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:33:25] Production.INFO: 62.25 MB  #Memory Used#   
[2025-02-26 17:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:34:05
    [end_date_ymd] => 2025-02-26 17:34:05
    [RateCDR] => 1
)
  
[2025-02-26 17:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:34:05' and `end` < '2025-02-26 17:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:34:18] Production.INFO: count ==4549  
[2025-02-26 17:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:34:05 - End Time 2025-02-26 17:34:05  
[2025-02-26 17:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563327', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563327', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563327', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563327', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:34:20] Production.INFO: ProcessCDR(1,14563327,1,1,2)  
[2025-02-26 17:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563327', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563327', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:34:25] Production.INFO: ==27615== Releasing lock...  
[2025-02-26 17:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:34:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 17:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:35:05
    [end_date_ymd] => 2025-02-26 17:35:05
    [RateCDR] => 1
)
  
[2025-02-26 17:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:35:05' and `end` < '2025-02-26 17:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:35:18] Production.INFO: count ==4532  
[2025-02-26 17:35:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:35:05 - End Time 2025-02-26 17:35:05  
[2025-02-26 17:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563332', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563332', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563332', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563332', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:35:20] Production.INFO: ProcessCDR(1,14563332,1,1,2)  
[2025-02-26 17:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:35:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:35:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563332', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563332', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:35:25] Production.INFO: ==27688== Releasing lock...  
[2025-02-26 17:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:35:25] Production.INFO: 62 MB  #Memory Used#   
[2025-02-26 17:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:36:05
    [end_date_ymd] => 2025-02-26 17:36:05
    [RateCDR] => 1
)
  
[2025-02-26 17:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:36:05' and `end` < '2025-02-26 17:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:36:18] Production.INFO: count ==4499  
[2025-02-26 17:36:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:36:05 - End Time 2025-02-26 17:36:05  
[2025-02-26 17:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563337', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563337', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563337', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563337', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:36:20] Production.INFO: ProcessCDR(1,14563337,1,1,2)  
[2025-02-26 17:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:36:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:36:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:36:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563337', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563337', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:36:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:36:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:36:24] Production.INFO: ==27763== Releasing lock...  
[2025-02-26 17:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:36:24] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 17:37:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:37:04
    [end_date_ymd] => 2025-02-26 17:37:04
    [RateCDR] => 1
)
  
[2025-02-26 17:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:37:04' and `end` < '2025-02-26 17:37:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:37:17] Production.INFO: count ==4509  
[2025-02-26 17:37:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:37:04 - End Time 2025-02-26 17:37:04  
[2025-02-26 17:37:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563342', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563342', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563342', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563342', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:37:19] Production.INFO: ProcessCDR(1,14563342,1,1,2)  
[2025-02-26 17:37:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:37:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:37:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563342', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563342', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:37:23] Production.INFO: ==27835== Releasing lock...  
[2025-02-26 17:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:37:23] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 17:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:38:06
    [end_date_ymd] => 2025-02-26 17:38:06
    [RateCDR] => 1
)
  
[2025-02-26 17:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:38:06' and `end` < '2025-02-26 17:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:38:18] Production.INFO: count ==4501  
[2025-02-26 17:38:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:38:06 - End Time 2025-02-26 17:38:06  
[2025-02-26 17:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563347', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563347', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563347', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563347', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:38:20] Production.INFO: ProcessCDR(1,14563347,1,1,2)  
[2025-02-26 17:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563347', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563347', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:38:25] Production.INFO: ==27912== Releasing lock...  
[2025-02-26 17:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:38:25] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 17:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:39:05
    [end_date_ymd] => 2025-02-26 17:39:05
    [RateCDR] => 1
)
  
[2025-02-26 17:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:39:05' and `end` < '2025-02-26 17:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:39:17] Production.INFO: count ==4497  
[2025-02-26 17:39:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:39:05 - End Time 2025-02-26 17:39:05  
[2025-02-26 17:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563352', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563352', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563352', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563352', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:39:19] Production.INFO: ProcessCDR(1,14563352,1,1,2)  
[2025-02-26 17:39:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:39:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563352', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563352', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:39:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:39:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:39:24] Production.INFO: ==27985== Releasing lock...  
[2025-02-26 17:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:39:24] Production.INFO: 61.75 MB  #Memory Used#   
[2025-02-26 17:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:40:06
    [end_date_ymd] => 2025-02-26 17:40:06
    [RateCDR] => 1
)
  
[2025-02-26 17:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:40:06' and `end` < '2025-02-26 17:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:40:19] Production.INFO: count ==4489  
[2025-02-26 17:40:21] Production.ERROR: pbx CDR StartTime 2025-02-26 14:40:06 - End Time 2025-02-26 17:40:06  
[2025-02-26 17:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563358', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563358', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563358', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563358', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:40:21] Production.INFO: ProcessCDR(1,14563358,1,1,2)  
[2025-02-26 17:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563358', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563358', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:40:26] Production.INFO: ==28058== Releasing lock...  
[2025-02-26 17:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:40:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 17:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:41:05
    [end_date_ymd] => 2025-02-26 17:41:05
    [RateCDR] => 1
)
  
[2025-02-26 17:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:41:05' and `end` < '2025-02-26 17:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:41:18] Production.INFO: count ==4487  
[2025-02-26 17:41:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:41:05 - End Time 2025-02-26 17:41:05  
[2025-02-26 17:41:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563363', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563363', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563363', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563363', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:41:19] Production.INFO: ProcessCDR(1,14563363,1,1,2)  
[2025-02-26 17:41:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:41:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:41:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:41:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563363', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563363', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:41:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:41:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:41:23] Production.INFO: ==28134== Releasing lock...  
[2025-02-26 17:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:41:23] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 17:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:42:05
    [end_date_ymd] => 2025-02-26 17:42:05
    [RateCDR] => 1
)
  
[2025-02-26 17:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:42:05' and `end` < '2025-02-26 17:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:42:18] Production.INFO: count ==4471  
[2025-02-26 17:42:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:42:05 - End Time 2025-02-26 17:42:05  
[2025-02-26 17:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563368', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563368', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563368', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563368', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:42:20] Production.INFO: ProcessCDR(1,14563368,1,1,2)  
[2025-02-26 17:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:42:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:42:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:42:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563368', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563368', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:42:25] Production.INFO: ==28206== Releasing lock...  
[2025-02-26 17:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:42:25] Production.INFO: 61.5 MB  #Memory Used#   
[2025-02-26 17:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:43:05
    [end_date_ymd] => 2025-02-26 17:43:05
    [RateCDR] => 1
)
  
[2025-02-26 17:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:43:05' and `end` < '2025-02-26 17:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:43:17] Production.INFO: count ==4458  
[2025-02-26 17:43:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:43:05 - End Time 2025-02-26 17:43:05  
[2025-02-26 17:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563373', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563373', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563373', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563373', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:43:19] Production.INFO: ProcessCDR(1,14563373,1,1,2)  
[2025-02-26 17:43:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:43:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563373', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563373', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:43:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:43:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:43:24] Production.INFO: ==28285== Releasing lock...  
[2025-02-26 17:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:43:24] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 17:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:44:05
    [end_date_ymd] => 2025-02-26 17:44:05
    [RateCDR] => 1
)
  
[2025-02-26 17:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:44:05' and `end` < '2025-02-26 17:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:44:18] Production.INFO: count ==4437  
[2025-02-26 17:44:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:44:05 - End Time 2025-02-26 17:44:05  
[2025-02-26 17:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563378', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563378', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563378', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563378', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:44:20] Production.INFO: ProcessCDR(1,14563378,1,1,2)  
[2025-02-26 17:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563378', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563378', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:44:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:44:25] Production.INFO: ==28413== Releasing lock...  
[2025-02-26 17:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:44:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 17:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:45:05
    [end_date_ymd] => 2025-02-26 17:45:05
    [RateCDR] => 1
)
  
[2025-02-26 17:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:45:05' and `end` < '2025-02-26 17:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:45:18] Production.INFO: count ==4425  
[2025-02-26 17:45:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:45:05 - End Time 2025-02-26 17:45:05  
[2025-02-26 17:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563383', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563383', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563383', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563383', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:45:19] Production.INFO: ProcessCDR(1,14563383,1,1,2)  
[2025-02-26 17:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:45:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:45:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:45:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:45:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563383', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:45:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563383', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:45:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:45:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:45:23] Production.INFO: ==28532== Releasing lock...  
[2025-02-26 17:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:45:23] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:46:05
    [end_date_ymd] => 2025-02-26 17:46:05
    [RateCDR] => 1
)
  
[2025-02-26 17:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:46:05' and `end` < '2025-02-26 17:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:46:18] Production.INFO: count ==4417  
[2025-02-26 17:46:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:46:05 - End Time 2025-02-26 17:46:05  
[2025-02-26 17:46:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563388', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563388', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563388', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563388', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:46:19] Production.INFO: ProcessCDR(1,14563388,1,1,2)  
[2025-02-26 17:46:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:46:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:46:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:46:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563388', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563388', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:46:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:46:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:46:24] Production.INFO: ==28646== Releasing lock...  
[2025-02-26 17:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:46:24] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:47:05
    [end_date_ymd] => 2025-02-26 17:47:05
    [RateCDR] => 1
)
  
[2025-02-26 17:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:47:05' and `end` < '2025-02-26 17:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:47:18] Production.INFO: count ==4414  
[2025-02-26 17:47:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:47:05 - End Time 2025-02-26 17:47:05  
[2025-02-26 17:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563393', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563393', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563393', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563393', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:47:19] Production.INFO: ProcessCDR(1,14563393,1,1,2)  
[2025-02-26 17:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:47:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:47:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:47:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563393', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563393', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:47:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:47:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:47:23] Production.INFO: ==28719== Releasing lock...  
[2025-02-26 17:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:47:23] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:48:05
    [end_date_ymd] => 2025-02-26 17:48:05
    [RateCDR] => 1
)
  
[2025-02-26 17:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:48:05' and `end` < '2025-02-26 17:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:48:18] Production.INFO: count ==4411  
[2025-02-26 17:48:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:48:05 - End Time 2025-02-26 17:48:05  
[2025-02-26 17:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563398', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563398', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563398', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563398', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:48:20] Production.INFO: ProcessCDR(1,14563398,1,1,2)  
[2025-02-26 17:48:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:48:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:48:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:48:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563398', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563398', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:48:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:48:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:48:25] Production.INFO: ==28792== Releasing lock...  
[2025-02-26 17:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:48:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:49:05
    [end_date_ymd] => 2025-02-26 17:49:05
    [RateCDR] => 1
)
  
[2025-02-26 17:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:49:05' and `end` < '2025-02-26 17:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:49:18] Production.INFO: count ==4417  
[2025-02-26 17:49:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:49:05 - End Time 2025-02-26 17:49:05  
[2025-02-26 17:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563403', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563403', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563403', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563403', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:49:19] Production.INFO: ProcessCDR(1,14563403,1,1,2)  
[2025-02-26 17:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:49:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:49:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563403', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:49:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563403', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:49:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:49:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:49:23] Production.INFO: ==28871== Releasing lock...  
[2025-02-26 17:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:49:23] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:50:06
    [end_date_ymd] => 2025-02-26 17:50:06
    [RateCDR] => 1
)
  
[2025-02-26 17:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:50:06' and `end` < '2025-02-26 17:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:50:19] Production.INFO: count ==4426  
[2025-02-26 17:50:21] Production.ERROR: pbx CDR StartTime 2025-02-26 14:50:06 - End Time 2025-02-26 17:50:06  
[2025-02-26 17:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563409', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563409', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563409', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563409', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:50:21] Production.INFO: ProcessCDR(1,14563409,1,1,2)  
[2025-02-26 17:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563409', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563409', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:50:26] Production.INFO: ==28945== Releasing lock...  
[2025-02-26 17:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:50:26] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:51:05
    [end_date_ymd] => 2025-02-26 17:51:05
    [RateCDR] => 1
)
  
[2025-02-26 17:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:51:05' and `end` < '2025-02-26 17:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:51:18] Production.INFO: count ==4452  
[2025-02-26 17:51:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:51:05 - End Time 2025-02-26 17:51:05  
[2025-02-26 17:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563414', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563414', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563414', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563414', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:51:20] Production.INFO: ProcessCDR(1,14563414,1,1,2)  
[2025-02-26 17:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:51:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:51:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563414', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563414', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:51:25] Production.INFO: ==29021== Releasing lock...  
[2025-02-26 17:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:51:25] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 17:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:52:05
    [end_date_ymd] => 2025-02-26 17:52:05
    [RateCDR] => 1
)
  
[2025-02-26 17:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:52:05' and `end` < '2025-02-26 17:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:52:18] Production.INFO: count ==4445  
[2025-02-26 17:52:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:52:05 - End Time 2025-02-26 17:52:05  
[2025-02-26 17:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563419', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563419', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563419', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563419', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:52:20] Production.INFO: ProcessCDR(1,14563419,1,1,2)  
[2025-02-26 17:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:52:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563419', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563419', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:52:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:52:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:52:24] Production.INFO: ==29090== Releasing lock...  
[2025-02-26 17:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:52:24] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 17:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:53:05
    [end_date_ymd] => 2025-02-26 17:53:05
    [RateCDR] => 1
)
  
[2025-02-26 17:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:53:05' and `end` < '2025-02-26 17:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:53:17] Production.INFO: count ==4435  
[2025-02-26 17:53:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:53:05 - End Time 2025-02-26 17:53:05  
[2025-02-26 17:53:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563424', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563424', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563424', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563424', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:53:19] Production.INFO: ProcessCDR(1,14563424,1,1,2)  
[2025-02-26 17:53:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:53:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:53:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:53:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:53:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563424', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:53:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563424', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:53:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:53:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:53:24] Production.INFO: ==29163== Releasing lock...  
[2025-02-26 17:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:53:24] Production.INFO: 61.25 MB  #Memory Used#   
[2025-02-26 17:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:54:06
    [end_date_ymd] => 2025-02-26 17:54:06
    [RateCDR] => 1
)
  
[2025-02-26 17:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:54:06' and `end` < '2025-02-26 17:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:54:18] Production.INFO: count ==4410  
[2025-02-26 17:54:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:54:06 - End Time 2025-02-26 17:54:06  
[2025-02-26 17:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563429', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563429', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563429', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563429', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:54:20] Production.INFO: ProcessCDR(1,14563429,1,1,2)  
[2025-02-26 17:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563429', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563429', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:54:25] Production.INFO: ==29242== Releasing lock...  
[2025-02-26 17:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:54:25] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:55:06
    [end_date_ymd] => 2025-02-26 17:55:06
    [RateCDR] => 1
)
  
[2025-02-26 17:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:55:06' and `end` < '2025-02-26 17:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:55:19] Production.INFO: count ==4403  
[2025-02-26 17:55:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:55:06 - End Time 2025-02-26 17:55:06  
[2025-02-26 17:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563434', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563434', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563434', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563434', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:55:20] Production.INFO: ProcessCDR(1,14563434,1,1,2)  
[2025-02-26 17:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:55:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:55:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563434', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563434', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:55:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:55:24] Production.INFO: ==29315== Releasing lock...  
[2025-02-26 17:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:55:24] Production.INFO: 61 MB  #Memory Used#   
[2025-02-26 17:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:56:06
    [end_date_ymd] => 2025-02-26 17:56:06
    [RateCDR] => 1
)
  
[2025-02-26 17:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:56:06' and `end` < '2025-02-26 17:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:56:18] Production.INFO: count ==4394  
[2025-02-26 17:56:20] Production.ERROR: pbx CDR StartTime 2025-02-26 14:56:06 - End Time 2025-02-26 17:56:06  
[2025-02-26 17:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563439', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563439', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563439', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563439', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:56:20] Production.INFO: ProcessCDR(1,14563439,1,1,2)  
[2025-02-26 17:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:56:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:56:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:56:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563439', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563439', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:56:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:56:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:56:23] Production.INFO: ==29389== Releasing lock...  
[2025-02-26 17:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:56:23] Production.INFO: 60.75 MB  #Memory Used#   
[2025-02-26 17:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:57:05
    [end_date_ymd] => 2025-02-26 17:57:05
    [RateCDR] => 1
)
  
[2025-02-26 17:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:57:05' and `end` < '2025-02-26 17:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:57:18] Production.INFO: count ==4360  
[2025-02-26 17:57:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:57:05 - End Time 2025-02-26 17:57:05  
[2025-02-26 17:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563444', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563444', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563444', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563444', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:57:20] Production.INFO: ProcessCDR(1,14563444,1,1,2)  
[2025-02-26 17:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:57:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:57:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:57:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563444', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563444', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:57:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:57:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:57:24] Production.INFO: ==29466== Releasing lock...  
[2025-02-26 17:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:57:24] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 17:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:58:05
    [end_date_ymd] => 2025-02-26 17:58:05
    [RateCDR] => 1
)
  
[2025-02-26 17:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:58:05' and `end` < '2025-02-26 17:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:58:18] Production.INFO: count ==4341  
[2025-02-26 17:58:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:58:05 - End Time 2025-02-26 17:58:05  
[2025-02-26 17:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563449', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563449', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563449', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563449', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:58:19] Production.INFO: ProcessCDR(1,14563449,1,1,2)  
[2025-02-26 17:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563449', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563449', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:58:23] Production.INFO: ==29540== Releasing lock...  
[2025-02-26 17:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:58:23] Production.INFO: 60.5 MB  #Memory Used#   
[2025-02-26 17:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 14:59:05
    [end_date_ymd] => 2025-02-26 17:59:05
    [RateCDR] => 1
)
  
[2025-02-26 17:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 14:59:05' and `end` < '2025-02-26 17:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 17:59:18] Production.INFO: count ==4323  
[2025-02-26 17:59:19] Production.ERROR: pbx CDR StartTime 2025-02-26 14:59:05 - End Time 2025-02-26 17:59:05  
[2025-02-26 17:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 17:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563454', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563454', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563454', 'tblTempVendorCDR_20' ) start  
[2025-02-26 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563454', 'tblTempVendorCDR_20' ) end  
[2025-02-26 17:59:20] Production.INFO: ProcessCDR(1,14563454,1,1,2)  
[2025-02-26 17:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:59:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 17:59:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 17:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563454', 'tblTempUsageDetail_20' ) start  
[2025-02-26 17:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563454', 'tblTempUsageDetail_20' ) end  
[2025-02-26 17:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 17:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 17:59:24] Production.INFO: ==29614== Releasing lock...  
[2025-02-26 17:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 17:59:24] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 18:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:00:06
    [end_date_ymd] => 2025-02-26 18:00:06
    [RateCDR] => 1
)
  
[2025-02-26 18:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:00:06' and `end` < '2025-02-26 18:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:00:19] Production.INFO: count ==4314  
[2025-02-26 18:00:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:00:06 - End Time 2025-02-26 18:00:06  
[2025-02-26 18:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563460', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563460', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563460', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563460', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:00:20] Production.INFO: ProcessCDR(1,14563460,1,1,2)  
[2025-02-26 18:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:00:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:00:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:00:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563460', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563460', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:00:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:00:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:00:25] Production.INFO: ==29689== Releasing lock...  
[2025-02-26 18:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:00:25] Production.INFO: 60.25 MB  #Memory Used#   
[2025-02-26 18:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:01:06
    [end_date_ymd] => 2025-02-26 18:01:06
    [RateCDR] => 1
)
  
[2025-02-26 18:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:01:06' and `end` < '2025-02-26 18:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:01:19] Production.INFO: count ==4291  
[2025-02-26 18:01:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:01:06 - End Time 2025-02-26 18:01:06  
[2025-02-26 18:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563465', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563465', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563465', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563465', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:01:20] Production.INFO: ProcessCDR(1,14563465,1,1,2)  
[2025-02-26 18:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:01:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563465', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:01:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563465', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:01:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:01:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:01:25] Production.INFO: ==29813== Releasing lock...  
[2025-02-26 18:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:01:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:02:05
    [end_date_ymd] => 2025-02-26 18:02:05
    [RateCDR] => 1
)
  
[2025-02-26 18:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:02:05' and `end` < '2025-02-26 18:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:02:18] Production.INFO: count ==4284  
[2025-02-26 18:02:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:02:05 - End Time 2025-02-26 18:02:05  
[2025-02-26 18:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563470', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563470', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563470', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563470', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:02:20] Production.INFO: ProcessCDR(1,14563470,1,1,2)  
[2025-02-26 18:02:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:02:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:02:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:02:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:02:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563470', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563470', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:02:25] Production.INFO: ==29883== Releasing lock...  
[2025-02-26 18:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:02:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:03:06
    [end_date_ymd] => 2025-02-26 18:03:06
    [RateCDR] => 1
)
  
[2025-02-26 18:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:03:06' and `end` < '2025-02-26 18:03:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:03:18] Production.INFO: count ==4284  
[2025-02-26 18:03:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:03:06 - End Time 2025-02-26 18:03:06  
[2025-02-26 18:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563475', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563475', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563475', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563475', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:03:20] Production.INFO: ProcessCDR(1,14563475,1,1,2)  
[2025-02-26 18:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563475', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563475', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:03:25] Production.INFO: ==29954== Releasing lock...  
[2025-02-26 18:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:03:25] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:04:05
    [end_date_ymd] => 2025-02-26 18:04:05
    [RateCDR] => 1
)
  
[2025-02-26 18:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:04:05' and `end` < '2025-02-26 18:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:04:18] Production.INFO: count ==4277  
[2025-02-26 18:04:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:04:05 - End Time 2025-02-26 18:04:05  
[2025-02-26 18:04:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563480', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563480', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563480', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563480', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:04:19] Production.INFO: ProcessCDR(1,14563480,1,1,2)  
[2025-02-26 18:04:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:04:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:04:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:04:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563480', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563480', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:04:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:04:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:04:24] Production.INFO: ==30027== Releasing lock...  
[2025-02-26 18:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:04:24] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:05:06
    [end_date_ymd] => 2025-02-26 18:05:06
    [RateCDR] => 1
)
  
[2025-02-26 18:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:05:06' and `end` < '2025-02-26 18:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:05:18] Production.INFO: count ==4274  
[2025-02-26 18:05:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:05:06 - End Time 2025-02-26 18:05:06  
[2025-02-26 18:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563485', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563485', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563485', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563485', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:05:20] Production.INFO: ProcessCDR(1,14563485,1,1,2)  
[2025-02-26 18:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:05:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563485', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563485', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:05:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:05:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:05:24] Production.INFO: ==30105== Releasing lock...  
[2025-02-26 18:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:05:24] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:06:05
    [end_date_ymd] => 2025-02-26 18:06:05
    [RateCDR] => 1
)
  
[2025-02-26 18:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:06:05' and `end` < '2025-02-26 18:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:06:18] Production.INFO: count ==4258  
[2025-02-26 18:06:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:06:05 - End Time 2025-02-26 18:06:05  
[2025-02-26 18:06:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563490', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563490', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563490', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563490', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:06:19] Production.INFO: ProcessCDR(1,14563490,1,1,2)  
[2025-02-26 18:06:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:06:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:06:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:06:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563490', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563490', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:06:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:06:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:06:24] Production.INFO: ==30176== Releasing lock...  
[2025-02-26 18:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:06:24] Production.INFO: 59.75 MB  #Memory Used#   
[2025-02-26 18:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:07:05
    [end_date_ymd] => 2025-02-26 18:07:05
    [RateCDR] => 1
)
  
[2025-02-26 18:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:07:05' and `end` < '2025-02-26 18:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:07:18] Production.INFO: count ==4237  
[2025-02-26 18:07:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:07:05 - End Time 2025-02-26 18:07:05  
[2025-02-26 18:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563495', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563495', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563495', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563495', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:07:19] Production.INFO: ProcessCDR(1,14563495,1,1,2)  
[2025-02-26 18:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563495', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563495', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:07:24] Production.INFO: ==30247== Releasing lock...  
[2025-02-26 18:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:07:24] Production.INFO: 60 MB  #Memory Used#   
[2025-02-26 18:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:08:05
    [end_date_ymd] => 2025-02-26 18:08:05
    [RateCDR] => 1
)
  
[2025-02-26 18:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:08:05' and `end` < '2025-02-26 18:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:08:17] Production.INFO: count ==4228  
[2025-02-26 18:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:08:05 - End Time 2025-02-26 18:08:05  
[2025-02-26 18:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563500', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563500', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563500', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563500', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:08:18] Production.INFO: ProcessCDR(1,14563500,1,1,2)  
[2025-02-26 18:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563500', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563500', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:08:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:08:22] Production.INFO: ==30318== Releasing lock...  
[2025-02-26 18:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:08:22] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 18:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:09:05
    [end_date_ymd] => 2025-02-26 18:09:05
    [RateCDR] => 1
)
  
[2025-02-26 18:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:09:05' and `end` < '2025-02-26 18:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:09:18] Production.INFO: count ==4217  
[2025-02-26 18:09:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:09:05 - End Time 2025-02-26 18:09:05  
[2025-02-26 18:09:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563505', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563505', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563505', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563505', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:09:19] Production.INFO: ProcessCDR(1,14563505,1,1,2)  
[2025-02-26 18:09:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:09:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:09:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:09:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563505', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563505', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:09:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:09:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:09:24] Production.INFO: ==30389== Releasing lock...  
[2025-02-26 18:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:09:24] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 18:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:10:06
    [end_date_ymd] => 2025-02-26 18:10:06
    [RateCDR] => 1
)
  
[2025-02-26 18:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:10:06' and `end` < '2025-02-26 18:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:10:19] Production.INFO: count ==4221  
[2025-02-26 18:10:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:10:06 - End Time 2025-02-26 18:10:06  
[2025-02-26 18:10:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563511', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563511', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563511', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563511', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:10:20] Production.INFO: ProcessCDR(1,14563511,1,1,2)  
[2025-02-26 18:10:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:10:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:10:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:10:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563511', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563511', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:10:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:10:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:10:25] Production.INFO: ==30463== Releasing lock...  
[2025-02-26 18:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:10:25] Production.INFO: 59.5 MB  #Memory Used#   
[2025-02-26 18:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:11:05
    [end_date_ymd] => 2025-02-26 18:11:05
    [RateCDR] => 1
)
  
[2025-02-26 18:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:11:05' and `end` < '2025-02-26 18:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:11:18] Production.INFO: count ==4114  
[2025-02-26 18:11:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:11:05 - End Time 2025-02-26 18:11:05  
[2025-02-26 18:11:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563516', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563516', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563516', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563516', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:11:19] Production.INFO: ProcessCDR(1,14563516,1,1,2)  
[2025-02-26 18:11:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:11:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563516', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563516', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:11:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:11:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:11:22] Production.INFO: ==30542== Releasing lock...  
[2025-02-26 18:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:11:22] Production.INFO: 59 MB  #Memory Used#   
[2025-02-26 18:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:12:05
    [end_date_ymd] => 2025-02-26 18:12:05
    [RateCDR] => 1
)
  
[2025-02-26 18:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:12:05' and `end` < '2025-02-26 18:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:12:18] Production.INFO: count ==4102  
[2025-02-26 18:12:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:12:05 - End Time 2025-02-26 18:12:05  
[2025-02-26 18:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563521', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563521', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563521', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563521', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:12:20] Production.INFO: ProcessCDR(1,14563521,1,1,2)  
[2025-02-26 18:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:12:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:12:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:12:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563521', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563521', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:12:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:12:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:12:23] Production.INFO: ==30613== Releasing lock...  
[2025-02-26 18:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:12:23] Production.INFO: 58.75 MB  #Memory Used#   
[2025-02-26 18:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:13:05
    [end_date_ymd] => 2025-02-26 18:13:05
    [RateCDR] => 1
)
  
[2025-02-26 18:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:13:05' and `end` < '2025-02-26 18:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:13:18] Production.INFO: count ==4079  
[2025-02-26 18:13:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:13:05 - End Time 2025-02-26 18:13:05  
[2025-02-26 18:13:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563526', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563526', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563526', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563526', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:13:19] Production.INFO: ProcessCDR(1,14563526,1,1,2)  
[2025-02-26 18:13:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:13:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:13:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:13:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:13:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563526', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:13:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563526', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:13:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:13:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:13:23] Production.INFO: ==30684== Releasing lock...  
[2025-02-26 18:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:13:23] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 18:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:14:05
    [end_date_ymd] => 2025-02-26 18:14:05
    [RateCDR] => 1
)
  
[2025-02-26 18:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:14:05' and `end` < '2025-02-26 18:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:14:17] Production.INFO: count ==4072  
[2025-02-26 18:14:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:14:05 - End Time 2025-02-26 18:14:05  
[2025-02-26 18:14:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563531', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563531', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563531', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563531', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:14:19] Production.INFO: ProcessCDR(1,14563531,1,1,2)  
[2025-02-26 18:14:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:14:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563531', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563531', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:14:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:14:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:14:24] Production.INFO: ==30757== Releasing lock...  
[2025-02-26 18:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:14:24] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 18:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:15:05
    [end_date_ymd] => 2025-02-26 18:15:05
    [RateCDR] => 1
)
  
[2025-02-26 18:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:15:05' and `end` < '2025-02-26 18:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:15:17] Production.INFO: count ==4064  
[2025-02-26 18:15:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:15:05 - End Time 2025-02-26 18:15:05  
[2025-02-26 18:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563536', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563536', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563536', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563536', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:15:19] Production.INFO: ProcessCDR(1,14563536,1,1,2)  
[2025-02-26 18:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563536', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563536', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:15:22] Production.INFO: ==30829== Releasing lock...  
[2025-02-26 18:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:15:22] Production.INFO: 58.5 MB  #Memory Used#   
[2025-02-26 18:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:16:06
    [end_date_ymd] => 2025-02-26 18:16:06
    [RateCDR] => 1
)
  
[2025-02-26 18:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:16:06' and `end` < '2025-02-26 18:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:16:18] Production.INFO: count ==4047  
[2025-02-26 18:16:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:16:06 - End Time 2025-02-26 18:16:06  
[2025-02-26 18:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563541', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563541', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563541', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563541', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:16:20] Production.INFO: ProcessCDR(1,14563541,1,1,2)  
[2025-02-26 18:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:16:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:16:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:16:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563541', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563541', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:16:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:16:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:16:23] Production.INFO: ==30899== Releasing lock...  
[2025-02-26 18:16:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:16:23] Production.INFO: 58.25 MB  #Memory Used#   
[2025-02-26 18:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:17:05
    [end_date_ymd] => 2025-02-26 18:17:05
    [RateCDR] => 1
)
  
[2025-02-26 18:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:17:05' and `end` < '2025-02-26 18:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:17:18] Production.INFO: count ==4044  
[2025-02-26 18:17:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:17:05 - End Time 2025-02-26 18:17:05  
[2025-02-26 18:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563546', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563546', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:17:19] Production.INFO: ProcessCDR(1,14563546,1,1,2)  
[2025-02-26 18:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:17:23] Production.INFO: ==31010== Releasing lock...  
[2025-02-26 18:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:17:23] Production.INFO: 58.25 MB  #Memory Used#   
[2025-02-26 18:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:18:06
    [end_date_ymd] => 2025-02-26 18:18:06
    [RateCDR] => 1
)
  
[2025-02-26 18:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:18:06' and `end` < '2025-02-26 18:18:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:18:19] Production.INFO: count ==4035  
[2025-02-26 18:18:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:18:06 - End Time 2025-02-26 18:18:06  
[2025-02-26 18:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563551', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563551', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563551', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563551', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:18:20] Production.INFO: ProcessCDR(1,14563551,1,1,2)  
[2025-02-26 18:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:18:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:18:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563551', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563551', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:18:25] Production.INFO: ==31081== Releasing lock...  
[2025-02-26 18:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:18:25] Production.INFO: 58.25 MB  #Memory Used#   
[2025-02-26 18:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:19:05
    [end_date_ymd] => 2025-02-26 18:19:05
    [RateCDR] => 1
)
  
[2025-02-26 18:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:19:05' and `end` < '2025-02-26 18:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:19:17] Production.INFO: count ==4002  
[2025-02-26 18:19:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:19:05 - End Time 2025-02-26 18:19:05  
[2025-02-26 18:19:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563556', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563556', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563556', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563556', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:19:19] Production.INFO: ProcessCDR(1,14563556,1,1,2)  
[2025-02-26 18:19:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:19:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:19:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:19:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563556', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563556', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:19:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:19:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:19:22] Production.INFO: ==31151== Releasing lock...  
[2025-02-26 18:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:19:22] Production.INFO: 57.75 MB  #Memory Used#   
[2025-02-26 18:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:20:06
    [end_date_ymd] => 2025-02-26 18:20:06
    [RateCDR] => 1
)
  
[2025-02-26 18:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:20:06' and `end` < '2025-02-26 18:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:20:19] Production.INFO: count ==4003  
[2025-02-26 18:20:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:20:06 - End Time 2025-02-26 18:20:06  
[2025-02-26 18:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563562', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563562', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563562', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563562', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:20:20] Production.INFO: ProcessCDR(1,14563562,1,1,2)  
[2025-02-26 18:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:20:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563562', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563562', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:20:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:20:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:20:24] Production.INFO: ==31224== Releasing lock...  
[2025-02-26 18:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:20:24] Production.INFO: 58 MB  #Memory Used#   
[2025-02-26 18:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:21:05
    [end_date_ymd] => 2025-02-26 18:21:05
    [RateCDR] => 1
)
  
[2025-02-26 18:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:21:05' and `end` < '2025-02-26 18:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:21:18] Production.INFO: count ==3956  
[2025-02-26 18:21:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:21:05 - End Time 2025-02-26 18:21:05  
[2025-02-26 18:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563567', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563567', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563567', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563567', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:21:19] Production.INFO: ProcessCDR(1,14563567,1,1,2)  
[2025-02-26 18:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563567', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563567', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:21:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:21:22] Production.INFO: ==31298== Releasing lock...  
[2025-02-26 18:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:21:22] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 18:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:22:06
    [end_date_ymd] => 2025-02-26 18:22:06
    [RateCDR] => 1
)
  
[2025-02-26 18:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:22:06' and `end` < '2025-02-26 18:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:22:18] Production.INFO: count ==3941  
[2025-02-26 18:22:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:22:06 - End Time 2025-02-26 18:22:06  
[2025-02-26 18:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563572', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563572', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563572', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563572', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:22:20] Production.INFO: ProcessCDR(1,14563572,1,1,2)  
[2025-02-26 18:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:22:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563572', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563572', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:22:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:22:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:22:24] Production.INFO: ==31370== Releasing lock...  
[2025-02-26 18:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:22:24] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 18:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:23:05
    [end_date_ymd] => 2025-02-26 18:23:05
    [RateCDR] => 1
)
  
[2025-02-26 18:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:23:05' and `end` < '2025-02-26 18:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:23:18] Production.INFO: count ==3933  
[2025-02-26 18:23:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:23:05 - End Time 2025-02-26 18:23:05  
[2025-02-26 18:23:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563577', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563577', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563577', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:23:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563577', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:23:19] Production.INFO: ProcessCDR(1,14563577,1,1,2)  
[2025-02-26 18:23:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:23:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563577', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563577', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:23:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:23:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:23:24] Production.INFO: ==31443== Releasing lock...  
[2025-02-26 18:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:23:24] Production.INFO: 57.25 MB  #Memory Used#   
[2025-02-26 18:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:24:05
    [end_date_ymd] => 2025-02-26 18:24:05
    [RateCDR] => 1
)
  
[2025-02-26 18:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:24:05' and `end` < '2025-02-26 18:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:24:18] Production.INFO: count ==3921  
[2025-02-26 18:24:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:24:05 - End Time 2025-02-26 18:24:05  
[2025-02-26 18:24:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563582', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563582', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563582', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563582', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:24:19] Production.INFO: ProcessCDR(1,14563582,1,1,2)  
[2025-02-26 18:24:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:24:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563582', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563582', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:24:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:24:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:24:24] Production.INFO: ==31525== Releasing lock...  
[2025-02-26 18:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:24:24] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 18:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:25:05
    [end_date_ymd] => 2025-02-26 18:25:05
    [RateCDR] => 1
)
  
[2025-02-26 18:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:25:05' and `end` < '2025-02-26 18:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:25:18] Production.INFO: count ==3897  
[2025-02-26 18:25:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:25:05 - End Time 2025-02-26 18:25:05  
[2025-02-26 18:25:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563587', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563587', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563587', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563587', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:25:19] Production.INFO: ProcessCDR(1,14563587,1,1,2)  
[2025-02-26 18:25:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:25:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:25:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563587', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563587', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:25:24] Production.INFO: ==31604== Releasing lock...  
[2025-02-26 18:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:25:24] Production.INFO: 57 MB  #Memory Used#   
[2025-02-26 18:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:26:06
    [end_date_ymd] => 2025-02-26 18:26:06
    [RateCDR] => 1
)
  
[2025-02-26 18:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:26:06' and `end` < '2025-02-26 18:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:26:19] Production.INFO: count ==3904  
[2025-02-26 18:26:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:26:06 - End Time 2025-02-26 18:26:06  
[2025-02-26 18:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563592', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563592', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563592', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563592', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:26:20] Production.INFO: ProcessCDR(1,14563592,1,1,2)  
[2025-02-26 18:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:26:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:26:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:26:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563592', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563592', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:26:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:26:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:26:23] Production.INFO: ==31677== Releasing lock...  
[2025-02-26 18:26:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:26:23] Production.INFO: 57.25 MB  #Memory Used#   
[2025-02-26 18:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:27:05
    [end_date_ymd] => 2025-02-26 18:27:05
    [RateCDR] => 1
)
  
[2025-02-26 18:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:27:05' and `end` < '2025-02-26 18:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:27:18] Production.INFO: count ==3900  
[2025-02-26 18:27:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:27:05 - End Time 2025-02-26 18:27:05  
[2025-02-26 18:27:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563597', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563597', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563597', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563597', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:27:19] Production.INFO: ProcessCDR(1,14563597,1,1,2)  
[2025-02-26 18:27:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563597', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563597', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:27:22] Production.INFO: ==31748== Releasing lock...  
[2025-02-26 18:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:27:22] Production.INFO: 57 MB  #Memory Used#   
[2025-02-26 18:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:28:06
    [end_date_ymd] => 2025-02-26 18:28:06
    [RateCDR] => 1
)
  
[2025-02-26 18:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:28:06' and `end` < '2025-02-26 18:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:28:19] Production.INFO: count ==3887  
[2025-02-26 18:28:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:28:06 - End Time 2025-02-26 18:28:06  
[2025-02-26 18:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563602', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563602', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:28:20] Production.INFO: ProcessCDR(1,14563602,1,1,2)  
[2025-02-26 18:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:28:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:28:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:28:25] Production.INFO: ==31819== Releasing lock...  
[2025-02-26 18:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:28:25] Production.INFO: 57.75 MB  #Memory Used#   
[2025-02-26 18:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:29:05
    [end_date_ymd] => 2025-02-26 18:29:05
    [RateCDR] => 1
)
  
[2025-02-26 18:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:29:05' and `end` < '2025-02-26 18:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:29:17] Production.INFO: count ==3874  
[2025-02-26 18:29:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:29:05 - End Time 2025-02-26 18:29:05  
[2025-02-26 18:29:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563607', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563607', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563607', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563607', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:29:19] Production.INFO: ProcessCDR(1,14563607,1,1,2)  
[2025-02-26 18:29:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:29:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:29:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:29:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563607', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563607', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:29:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:29:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:29:23] Production.INFO: ==31891== Releasing lock...  
[2025-02-26 18:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:29:23] Production.INFO: 57.5 MB  #Memory Used#   
[2025-02-26 18:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:30:06
    [end_date_ymd] => 2025-02-26 18:30:06
    [RateCDR] => 1
)
  
[2025-02-26 18:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:30:06' and `end` < '2025-02-26 18:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:30:19] Production.INFO: count ==3862  
[2025-02-26 18:30:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:30:06 - End Time 2025-02-26 18:30:06  
[2025-02-26 18:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563613', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563613', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563613', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563613', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:30:20] Production.INFO: ProcessCDR(1,14563613,1,1,2)  
[2025-02-26 18:30:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:30:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:30:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:30:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563613', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563613', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:30:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:30:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:30:25] Production.INFO: ==31965== Releasing lock...  
[2025-02-26 18:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:30:25] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 18:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:31:05
    [end_date_ymd] => 2025-02-26 18:31:05
    [RateCDR] => 1
)
  
[2025-02-26 18:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:31:05' and `end` < '2025-02-26 18:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:31:18] Production.INFO: count ==3816  
[2025-02-26 18:31:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:31:05 - End Time 2025-02-26 18:31:05  
[2025-02-26 18:31:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563618', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563618', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563618', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563618', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:31:19] Production.INFO: ProcessCDR(1,14563618,1,1,2)  
[2025-02-26 18:31:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:31:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:31:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:31:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:31:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563618', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:31:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563618', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:31:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:31:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:31:24] Production.INFO: ==32041== Releasing lock...  
[2025-02-26 18:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:31:24] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 18:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:32:06
    [end_date_ymd] => 2025-02-26 18:32:06
    [RateCDR] => 1
)
  
[2025-02-26 18:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:32:06' and `end` < '2025-02-26 18:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:32:19] Production.INFO: count ==3824  
[2025-02-26 18:32:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:32:06 - End Time 2025-02-26 18:32:06  
[2025-02-26 18:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563623', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563623', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563623', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563623', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:32:20] Production.INFO: ProcessCDR(1,14563623,1,1,2)  
[2025-02-26 18:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563623', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563623', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:32:25] Production.INFO: ==32150== Releasing lock...  
[2025-02-26 18:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:32:25] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 18:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:33:05
    [end_date_ymd] => 2025-02-26 18:33:05
    [RateCDR] => 1
)
  
[2025-02-26 18:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:33:05' and `end` < '2025-02-26 18:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:33:17] Production.INFO: count ==3815  
[2025-02-26 18:33:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:33:05 - End Time 2025-02-26 18:33:05  
[2025-02-26 18:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563628', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563628', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563628', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563628', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:33:19] Production.INFO: ProcessCDR(1,14563628,1,1,2)  
[2025-02-26 18:33:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563628', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563628', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:33:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:33:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:33:24] Production.INFO: ==32219== Releasing lock...  
[2025-02-26 18:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:33:24] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 18:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:34:05
    [end_date_ymd] => 2025-02-26 18:34:05
    [RateCDR] => 1
)
  
[2025-02-26 18:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:34:05' and `end` < '2025-02-26 18:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:34:18] Production.INFO: count ==3816  
[2025-02-26 18:34:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:34:05 - End Time 2025-02-26 18:34:05  
[2025-02-26 18:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563633', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563633', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563633', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563633', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:34:20] Production.INFO: ProcessCDR(1,14563633,1,1,2)  
[2025-02-26 18:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:34:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:34:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:34:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563633', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563633', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:34:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:34:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:34:24] Production.INFO: ==32290== Releasing lock...  
[2025-02-26 18:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:34:24] Production.INFO: 57.25 MB  #Memory Used#   
[2025-02-26 18:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:35:05
    [end_date_ymd] => 2025-02-26 18:35:05
    [RateCDR] => 1
)
  
[2025-02-26 18:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:35:05' and `end` < '2025-02-26 18:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:35:17] Production.INFO: count ==3812  
[2025-02-26 18:35:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:35:05 - End Time 2025-02-26 18:35:05  
[2025-02-26 18:35:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563638', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563638', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563638', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563638', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:35:19] Production.INFO: ProcessCDR(1,14563638,1,1,2)  
[2025-02-26 18:35:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:35:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:35:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:35:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563638', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563638', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:35:22] Production.INFO: ==32361== Releasing lock...  
[2025-02-26 18:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:35:22] Production.INFO: 56.5 MB  #Memory Used#   
[2025-02-26 18:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:36:05
    [end_date_ymd] => 2025-02-26 18:36:05
    [RateCDR] => 1
)
  
[2025-02-26 18:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:36:05' and `end` < '2025-02-26 18:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:36:18] Production.INFO: count ==3794  
[2025-02-26 18:36:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:36:05 - End Time 2025-02-26 18:36:05  
[2025-02-26 18:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563643', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563643', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563643', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563643', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:36:19] Production.INFO: ProcessCDR(1,14563643,1,1,2)  
[2025-02-26 18:36:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:36:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:36:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563643', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563643', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:36:23] Production.INFO: ==32433== Releasing lock...  
[2025-02-26 18:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:36:23] Production.INFO: 56.75 MB  #Memory Used#   
[2025-02-26 18:37:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:37:04
    [end_date_ymd] => 2025-02-26 18:37:04
    [RateCDR] => 1
)
  
[2025-02-26 18:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:37:04' and `end` < '2025-02-26 18:37:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:37:17] Production.INFO: count ==3786  
[2025-02-26 18:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:37:04 - End Time 2025-02-26 18:37:04  
[2025-02-26 18:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563648', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563648', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563648', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563648', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:37:18] Production.INFO: ProcessCDR(1,14563648,1,1,2)  
[2025-02-26 18:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:37:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:37:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:37:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:37:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563648', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563648', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:37:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:37:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:37:24] Production.INFO: ==32503== Releasing lock...  
[2025-02-26 18:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:37:24] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 18:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:38:05
    [end_date_ymd] => 2025-02-26 18:38:05
    [RateCDR] => 1
)
  
[2025-02-26 18:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:38:05' and `end` < '2025-02-26 18:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:38:18] Production.INFO: count ==3772  
[2025-02-26 18:38:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:38:05 - End Time 2025-02-26 18:38:05  
[2025-02-26 18:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563653', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563653', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563653', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563653', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:38:19] Production.INFO: ProcessCDR(1,14563653,1,1,2)  
[2025-02-26 18:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563653', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563653', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:38:24] Production.INFO: ==32574== Releasing lock...  
[2025-02-26 18:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:38:24] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 18:39:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:39:04
    [end_date_ymd] => 2025-02-26 18:39:04
    [RateCDR] => 1
)
  
[2025-02-26 18:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:39:04' and `end` < '2025-02-26 18:39:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:39:17] Production.INFO: count ==3749  
[2025-02-26 18:39:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:39:04 - End Time 2025-02-26 18:39:04  
[2025-02-26 18:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563658', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563658', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563658', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563658', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:39:18] Production.INFO: ProcessCDR(1,14563658,1,1,2)  
[2025-02-26 18:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:39:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:39:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:39:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563658', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563658', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:39:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:39:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:39:23] Production.INFO: ==32648== Releasing lock...  
[2025-02-26 18:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:39:23] Production.INFO: 56.25 MB  #Memory Used#   
[2025-02-26 18:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:40:06
    [end_date_ymd] => 2025-02-26 18:40:06
    [RateCDR] => 1
)
  
[2025-02-26 18:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:40:06' and `end` < '2025-02-26 18:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:40:18] Production.INFO: count ==3725  
[2025-02-26 18:40:20] Production.ERROR: pbx CDR StartTime 2025-02-26 15:40:06 - End Time 2025-02-26 18:40:06  
[2025-02-26 18:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563664', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563664', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563664', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563664', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:40:20] Production.INFO: ProcessCDR(1,14563664,1,1,2)  
[2025-02-26 18:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:40:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:40:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:40:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563664', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563664', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:40:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:40:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:40:25] Production.INFO: ==32721== Releasing lock...  
[2025-02-26 18:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:40:25] Production.INFO: 56 MB  #Memory Used#   
[2025-02-26 18:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:41:05
    [end_date_ymd] => 2025-02-26 18:41:05
    [RateCDR] => 1
)
  
[2025-02-26 18:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:41:05' and `end` < '2025-02-26 18:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:41:17] Production.INFO: count ==3668  
[2025-02-26 18:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:41:05 - End Time 2025-02-26 18:41:05  
[2025-02-26 18:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563669', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563669', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563669', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563669', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:41:18] Production.INFO: ProcessCDR(1,14563669,1,1,2)  
[2025-02-26 18:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:41:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:41:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:41:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563669', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563669', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:41:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:41:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:41:23] Production.INFO: ==334== Releasing lock...  
[2025-02-26 18:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:41:23] Production.INFO: 56 MB  #Memory Used#   
[2025-02-26 18:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:42:05
    [end_date_ymd] => 2025-02-26 18:42:05
    [RateCDR] => 1
)
  
[2025-02-26 18:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:42:05' and `end` < '2025-02-26 18:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:42:17] Production.INFO: count ==3637  
[2025-02-26 18:42:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:42:05 - End Time 2025-02-26 18:42:05  
[2025-02-26 18:42:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563674', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563674', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563674', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563674', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:42:19] Production.INFO: ProcessCDR(1,14563674,1,1,2)  
[2025-02-26 18:42:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563674', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563674', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:42:22] Production.INFO: ==420== Releasing lock...  
[2025-02-26 18:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:42:22] Production.INFO: 55.25 MB  #Memory Used#   
[2025-02-26 18:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:43:05
    [end_date_ymd] => 2025-02-26 18:43:05
    [RateCDR] => 1
)
  
[2025-02-26 18:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:43:05' and `end` < '2025-02-26 18:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:43:18] Production.INFO: count ==3625  
[2025-02-26 18:43:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:43:05 - End Time 2025-02-26 18:43:05  
[2025-02-26 18:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563679', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563679', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563679', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563679', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:43:19] Production.INFO: ProcessCDR(1,14563679,1,1,2)  
[2025-02-26 18:43:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:43:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563679', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563679', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:43:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:43:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:43:24] Production.INFO: ==498== Releasing lock...  
[2025-02-26 18:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:43:24] Production.INFO: 55.25 MB  #Memory Used#   
[2025-02-26 18:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:44:05
    [end_date_ymd] => 2025-02-26 18:44:05
    [RateCDR] => 1
)
  
[2025-02-26 18:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:44:05' and `end` < '2025-02-26 18:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:44:18] Production.INFO: count ==3612  
[2025-02-26 18:44:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:44:05 - End Time 2025-02-26 18:44:05  
[2025-02-26 18:44:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563684', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563684', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563684', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563684', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:44:19] Production.INFO: ProcessCDR(1,14563684,1,1,2)  
[2025-02-26 18:44:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:44:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:44:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:44:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563684', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563684', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:44:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:44:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:44:24] Production.INFO: ==571== Releasing lock...  
[2025-02-26 18:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:44:24] Production.INFO: 55 MB  #Memory Used#   
[2025-02-26 18:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:45:05
    [end_date_ymd] => 2025-02-26 18:45:05
    [RateCDR] => 1
)
  
[2025-02-26 18:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:45:05' and `end` < '2025-02-26 18:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:45:18] Production.INFO: count ==3599  
[2025-02-26 18:45:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:45:05 - End Time 2025-02-26 18:45:05  
[2025-02-26 18:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563689', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563689', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563689', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563689', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:45:19] Production.INFO: ProcessCDR(1,14563689,1,1,2)  
[2025-02-26 18:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:45:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:45:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:45:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563689', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563689', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:45:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:45:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:45:24] Production.INFO: ==651== Releasing lock...  
[2025-02-26 18:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:45:24] Production.INFO: 55.75 MB  #Memory Used#   
[2025-02-26 18:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:46:05
    [end_date_ymd] => 2025-02-26 18:46:05
    [RateCDR] => 1
)
  
[2025-02-26 18:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:46:05' and `end` < '2025-02-26 18:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:46:17] Production.INFO: count ==3582  
[2025-02-26 18:46:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:46:05 - End Time 2025-02-26 18:46:05  
[2025-02-26 18:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563694', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563694', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563694', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563694', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:46:18] Production.INFO: ProcessCDR(1,14563694,1,1,2)  
[2025-02-26 18:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:46:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563694', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563694', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:46:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:46:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:46:22] Production.INFO: ==753== Releasing lock...  
[2025-02-26 18:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:46:22] Production.INFO: 55 MB  #Memory Used#   
[2025-02-26 18:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:47:06
    [end_date_ymd] => 2025-02-26 18:47:06
    [RateCDR] => 1
)
  
[2025-02-26 18:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:47:06' and `end` < '2025-02-26 18:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:47:18] Production.INFO: count ==3556  
[2025-02-26 18:47:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:47:06 - End Time 2025-02-26 18:47:06  
[2025-02-26 18:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563699', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563699', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563699', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563699', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:47:19] Production.INFO: ProcessCDR(1,14563699,1,1,2)  
[2025-02-26 18:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:47:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:47:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:47:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563699', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563699', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:47:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:47:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:47:24] Production.INFO: ==864== Releasing lock...  
[2025-02-26 18:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:47:24] Production.INFO: 55.5 MB  #Memory Used#   
[2025-02-26 18:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:48:05
    [end_date_ymd] => 2025-02-26 18:48:05
    [RateCDR] => 1
)
  
[2025-02-26 18:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:48:05' and `end` < '2025-02-26 18:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:48:17] Production.INFO: count ==3543  
[2025-02-26 18:48:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:48:05 - End Time 2025-02-26 18:48:05  
[2025-02-26 18:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563704', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563704', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563704', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563704', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:48:19] Production.INFO: ProcessCDR(1,14563704,1,1,2)  
[2025-02-26 18:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:48:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:48:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563704', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563704', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:48:22] Production.INFO: ==936== Releasing lock...  
[2025-02-26 18:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:48:22] Production.INFO: 55 MB  #Memory Used#   
[2025-02-26 18:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:49:05
    [end_date_ymd] => 2025-02-26 18:49:05
    [RateCDR] => 1
)
  
[2025-02-26 18:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:49:05' and `end` < '2025-02-26 18:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:49:18] Production.INFO: count ==3525  
[2025-02-26 18:49:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:49:05 - End Time 2025-02-26 18:49:05  
[2025-02-26 18:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563709', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563709', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563709', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563709', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:49:19] Production.INFO: ProcessCDR(1,14563709,1,1,2)  
[2025-02-26 18:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:49:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:49:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563709', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563709', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:49:22] Production.INFO: ==1010== Releasing lock...  
[2025-02-26 18:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:49:22] Production.INFO: 55 MB  #Memory Used#   
[2025-02-26 18:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:50:06
    [end_date_ymd] => 2025-02-26 18:50:06
    [RateCDR] => 1
)
  
[2025-02-26 18:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:50:06' and `end` < '2025-02-26 18:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:50:18] Production.INFO: count ==3502  
[2025-02-26 18:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:50:06 - End Time 2025-02-26 18:50:06  
[2025-02-26 18:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563715', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563715', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563715', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563715', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:50:19] Production.INFO: ProcessCDR(1,14563715,1,1,2)  
[2025-02-26 18:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:50:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:50:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:50:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563715', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563715', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:50:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:50:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:50:24] Production.INFO: ==1088== Releasing lock...  
[2025-02-26 18:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:50:24] Production.INFO: 54.25 MB  #Memory Used#   
[2025-02-26 18:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:51:05
    [end_date_ymd] => 2025-02-26 18:51:05
    [RateCDR] => 1
)
  
[2025-02-26 18:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:51:05' and `end` < '2025-02-26 18:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:51:17] Production.INFO: count ==3404  
[2025-02-26 18:51:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:51:05 - End Time 2025-02-26 18:51:05  
[2025-02-26 18:51:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563720', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563720', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563720', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563720', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:51:19] Production.INFO: ProcessCDR(1,14563720,1,1,2)  
[2025-02-26 18:51:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:51:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:51:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563720', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563720', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:51:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:51:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:51:22] Production.INFO: ==1172== Releasing lock...  
[2025-02-26 18:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:51:22] Production.INFO: 54.25 MB  #Memory Used#   
[2025-02-26 18:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:52:05
    [end_date_ymd] => 2025-02-26 18:52:05
    [RateCDR] => 1
)
  
[2025-02-26 18:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:52:05' and `end` < '2025-02-26 18:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:52:17] Production.INFO: count ==3400  
[2025-02-26 18:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:52:05 - End Time 2025-02-26 18:52:05  
[2025-02-26 18:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563725', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563725', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563725', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563725', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:52:18] Production.INFO: ProcessCDR(1,14563725,1,1,2)  
[2025-02-26 18:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:52:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563725', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563725', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:52:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:52:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:52:23] Production.INFO: ==1261== Releasing lock...  
[2025-02-26 18:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:52:23] Production.INFO: 53.75 MB  #Memory Used#   
[2025-02-26 18:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:53:05
    [end_date_ymd] => 2025-02-26 18:53:05
    [RateCDR] => 1
)
  
[2025-02-26 18:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:53:05' and `end` < '2025-02-26 18:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:53:17] Production.INFO: count ==3382  
[2025-02-26 18:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:53:05 - End Time 2025-02-26 18:53:05  
[2025-02-26 18:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563730', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563730', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563730', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563730', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:53:18] Production.INFO: ProcessCDR(1,14563730,1,1,2)  
[2025-02-26 18:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:53:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:53:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:53:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563730', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563730', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:53:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:53:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:53:23] Production.INFO: ==1337== Releasing lock...  
[2025-02-26 18:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:53:23] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 18:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:54:06
    [end_date_ymd] => 2025-02-26 18:54:06
    [RateCDR] => 1
)
  
[2025-02-26 18:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:54:06' and `end` < '2025-02-26 18:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:54:18] Production.INFO: count ==3368  
[2025-02-26 18:54:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:54:06 - End Time 2025-02-26 18:54:06  
[2025-02-26 18:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563735', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563735', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563735', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563735', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:54:19] Production.INFO: ProcessCDR(1,14563735,1,1,2)  
[2025-02-26 18:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:54:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:54:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:54:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563735', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563735', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:54:25] Production.INFO: ==1413== Releasing lock...  
[2025-02-26 18:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:54:25] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 18:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:55:05
    [end_date_ymd] => 2025-02-26 18:55:05
    [RateCDR] => 1
)
  
[2025-02-26 18:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:55:05' and `end` < '2025-02-26 18:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:55:18] Production.INFO: count ==3364  
[2025-02-26 18:55:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:55:05 - End Time 2025-02-26 18:55:05  
[2025-02-26 18:55:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563740', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563740', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563740', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563740', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:55:19] Production.INFO: ProcessCDR(1,14563740,1,1,2)  
[2025-02-26 18:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563740', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563740', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:55:22] Production.INFO: ==1485== Releasing lock...  
[2025-02-26 18:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:55:22] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 18:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:56:05
    [end_date_ymd] => 2025-02-26 18:56:05
    [RateCDR] => 1
)
  
[2025-02-26 18:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:56:05' and `end` < '2025-02-26 18:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:56:18] Production.INFO: count ==3347  
[2025-02-26 18:56:19] Production.ERROR: pbx CDR StartTime 2025-02-26 15:56:05 - End Time 2025-02-26 18:56:05  
[2025-02-26 18:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563745', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563745', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563745', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563745', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:56:19] Production.INFO: ProcessCDR(1,14563745,1,1,2)  
[2025-02-26 18:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:56:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:56:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563745', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563745', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:56:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:56:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:56:24] Production.INFO: ==1599== Releasing lock...  
[2025-02-26 18:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:56:24] Production.INFO: 54 MB  #Memory Used#   
[2025-02-26 18:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:57:05
    [end_date_ymd] => 2025-02-26 18:57:05
    [RateCDR] => 1
)
  
[2025-02-26 18:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:57:05' and `end` < '2025-02-26 18:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:57:17] Production.INFO: count ==3329  
[2025-02-26 18:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:57:05 - End Time 2025-02-26 18:57:05  
[2025-02-26 18:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563750', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563750', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563750', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563750', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:57:19] Production.INFO: ProcessCDR(1,14563750,1,1,2)  
[2025-02-26 18:57:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:57:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:57:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563750', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563750', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:57:22] Production.INFO: ==1676== Releasing lock...  
[2025-02-26 18:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:57:22] Production.INFO: 52.75 MB  #Memory Used#   
[2025-02-26 18:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:58:05
    [end_date_ymd] => 2025-02-26 18:58:05
    [RateCDR] => 1
)
  
[2025-02-26 18:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:58:05' and `end` < '2025-02-26 18:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:58:17] Production.INFO: count ==3323  
[2025-02-26 18:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:58:05 - End Time 2025-02-26 18:58:05  
[2025-02-26 18:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563755', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563755', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563755', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563755', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:58:19] Production.INFO: ProcessCDR(1,14563755,1,1,2)  
[2025-02-26 18:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563755', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563755', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:58:22] Production.INFO: ==1751== Releasing lock...  
[2025-02-26 18:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:58:22] Production.INFO: 52.75 MB  #Memory Used#   
[2025-02-26 18:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 15:59:05
    [end_date_ymd] => 2025-02-26 18:59:05
    [RateCDR] => 1
)
  
[2025-02-26 18:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 15:59:05' and `end` < '2025-02-26 18:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 18:59:17] Production.INFO: count ==3314  
[2025-02-26 18:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 15:59:05 - End Time 2025-02-26 18:59:05  
[2025-02-26 18:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 18:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563760', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563760', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563760', 'tblTempVendorCDR_20' ) start  
[2025-02-26 18:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563760', 'tblTempVendorCDR_20' ) end  
[2025-02-26 18:59:18] Production.INFO: ProcessCDR(1,14563760,1,1,2)  
[2025-02-26 18:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 18:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:59:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 18:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563760', 'tblTempUsageDetail_20' ) start  
[2025-02-26 18:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563760', 'tblTempUsageDetail_20' ) end  
[2025-02-26 18:59:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 18:59:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 18:59:23] Production.INFO: ==1822== Releasing lock...  
[2025-02-26 18:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 18:59:23] Production.INFO: 53.5 MB  #Memory Used#   
[2025-02-26 19:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:00:06
    [end_date_ymd] => 2025-02-26 19:00:06
    [RateCDR] => 1
)
  
[2025-02-26 19:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:00:06' and `end` < '2025-02-26 19:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:00:19] Production.INFO: count ==3292  
[2025-02-26 19:00:20] Production.ERROR: pbx CDR StartTime 2025-02-26 16:00:06 - End Time 2025-02-26 19:00:06  
[2025-02-26 19:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563766', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563766', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563766', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563766', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:00:20] Production.INFO: ProcessCDR(1,14563766,1,1,2)  
[2025-02-26 19:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563766', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563766', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:00:23] Production.INFO: ==1905== Releasing lock...  
[2025-02-26 19:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:00:23] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 19:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:01:05
    [end_date_ymd] => 2025-02-26 19:01:05
    [RateCDR] => 1
)
  
[2025-02-26 19:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:01:05' and `end` < '2025-02-26 19:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:01:17] Production.INFO: count ==3224  
[2025-02-26 19:01:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:01:05 - End Time 2025-02-26 19:01:05  
[2025-02-26 19:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563771', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563771', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563771', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563771', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:01:18] Production.INFO: ProcessCDR(1,14563771,1,1,2)  
[2025-02-26 19:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563771', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563771', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:01:22] Production.INFO: ==2033== Releasing lock...  
[2025-02-26 19:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:01:22] Production.INFO: 53 MB  #Memory Used#   
[2025-02-26 19:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:02:06
    [end_date_ymd] => 2025-02-26 19:02:06
    [RateCDR] => 1
)
  
[2025-02-26 19:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:02:06' and `end` < '2025-02-26 19:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:02:18] Production.INFO: count ==3220  
[2025-02-26 19:02:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:02:06 - End Time 2025-02-26 19:02:06  
[2025-02-26 19:02:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563776', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563776', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563776', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563776', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:02:19] Production.INFO: ProcessCDR(1,14563776,1,1,2)  
[2025-02-26 19:02:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563776', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563776', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:02:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:02:23] Production.INFO: ==2151== Releasing lock...  
[2025-02-26 19:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:02:23] Production.INFO: 52.25 MB  #Memory Used#   
[2025-02-26 19:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:03:05
    [end_date_ymd] => 2025-02-26 19:03:05
    [RateCDR] => 1
)
  
[2025-02-26 19:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:03:05' and `end` < '2025-02-26 19:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:03:18] Production.INFO: count ==3216  
[2025-02-26 19:03:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:03:05 - End Time 2025-02-26 19:03:05  
[2025-02-26 19:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563781', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563781', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563781', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563781', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:03:19] Production.INFO: ProcessCDR(1,14563781,1,1,2)  
[2025-02-26 19:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:03:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:03:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:03:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563781', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563781', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:03:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:03:25] Production.INFO: ==2268== Releasing lock...  
[2025-02-26 19:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:03:25] Production.INFO: 52.25 MB  #Memory Used#   
[2025-02-26 19:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:04:06
    [end_date_ymd] => 2025-02-26 19:04:06
    [RateCDR] => 1
)
  
[2025-02-26 19:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:04:06' and `end` < '2025-02-26 19:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:04:18] Production.INFO: count ==3221  
[2025-02-26 19:04:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:04:06 - End Time 2025-02-26 19:04:06  
[2025-02-26 19:04:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563786', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563786', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563786', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:04:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563786', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:04:19] Production.INFO: ProcessCDR(1,14563786,1,1,2)  
[2025-02-26 19:04:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:04:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:04:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:04:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563786', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563786', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:04:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:04:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:04:25] Production.INFO: ==2345== Releasing lock...  
[2025-02-26 19:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:04:25] Production.INFO: 52.25 MB  #Memory Used#   
[2025-02-26 19:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:05:05
    [end_date_ymd] => 2025-02-26 19:05:05
    [RateCDR] => 1
)
  
[2025-02-26 19:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:05:05' and `end` < '2025-02-26 19:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:05:18] Production.INFO: count ==3205  
[2025-02-26 19:05:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:05:05 - End Time 2025-02-26 19:05:05  
[2025-02-26 19:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563791', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563791', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563791', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563791', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:05:19] Production.INFO: ProcessCDR(1,14563791,1,1,2)  
[2025-02-26 19:05:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:05:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563791', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563791', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:05:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:05:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:05:23] Production.INFO: ==2496== Releasing lock...  
[2025-02-26 19:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:05:23] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 19:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:06:06
    [end_date_ymd] => 2025-02-26 19:06:06
    [RateCDR] => 1
)
  
[2025-02-26 19:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:06:06' and `end` < '2025-02-26 19:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:06:18] Production.INFO: count ==3186  
[2025-02-26 19:06:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:06:06 - End Time 2025-02-26 19:06:06  
[2025-02-26 19:06:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563796', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563796', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563796', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563796', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:06:19] Production.INFO: ProcessCDR(1,14563796,1,1,2)  
[2025-02-26 19:06:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:06:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:06:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:06:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563796', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563796', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:06:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:06:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:06:24] Production.INFO: ==2578== Releasing lock...  
[2025-02-26 19:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:06:24] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 19:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:07:05
    [end_date_ymd] => 2025-02-26 19:07:05
    [RateCDR] => 1
)
  
[2025-02-26 19:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:07:05' and `end` < '2025-02-26 19:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:07:18] Production.INFO: count ==3185  
[2025-02-26 19:07:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:07:05 - End Time 2025-02-26 19:07:05  
[2025-02-26 19:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563801', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563801', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563801', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563801', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:07:19] Production.INFO: ProcessCDR(1,14563801,1,1,2)  
[2025-02-26 19:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:07:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:07:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563801', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563801', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:07:22] Production.INFO: ==2651== Releasing lock...  
[2025-02-26 19:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:07:22] Production.INFO: 52.5 MB  #Memory Used#   
[2025-02-26 19:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:08:06
    [end_date_ymd] => 2025-02-26 19:08:06
    [RateCDR] => 1
)
  
[2025-02-26 19:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:08:06' and `end` < '2025-02-26 19:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:08:18] Production.INFO: count ==3190  
[2025-02-26 19:08:20] Production.ERROR: pbx CDR StartTime 2025-02-26 16:08:06 - End Time 2025-02-26 19:08:06  
[2025-02-26 19:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563806', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563806', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563806', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563806', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:08:20] Production.INFO: ProcessCDR(1,14563806,1,1,2)  
[2025-02-26 19:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:08:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:08:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563806', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563806', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:08:25] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:08:25] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:08:25] Production.INFO: ==2801== Releasing lock...  
[2025-02-26 19:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:08:25] Production.INFO: 51.75 MB  #Memory Used#   
[2025-02-26 19:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:09:05
    [end_date_ymd] => 2025-02-26 19:09:05
    [RateCDR] => 1
)
  
[2025-02-26 19:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:09:05' and `end` < '2025-02-26 19:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:09:18] Production.INFO: count ==3149  
[2025-02-26 19:09:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:09:05 - End Time 2025-02-26 19:09:05  
[2025-02-26 19:09:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563811', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563811', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563811', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563811', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:09:19] Production.INFO: ProcessCDR(1,14563811,1,1,2)  
[2025-02-26 19:09:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:09:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:09:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:09:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563811', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563811', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:09:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:09:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:09:24] Production.INFO: ==2877== Releasing lock...  
[2025-02-26 19:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:09:24] Production.INFO: 52 MB  #Memory Used#   
[2025-02-26 19:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:10:06
    [end_date_ymd] => 2025-02-26 19:10:06
    [RateCDR] => 1
)
  
[2025-02-26 19:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:10:06' and `end` < '2025-02-26 19:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:10:18] Production.INFO: count ==3136  
[2025-02-26 19:10:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:10:06 - End Time 2025-02-26 19:10:06  
[2025-02-26 19:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563817', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563817', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563817', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563817', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:10:19] Production.INFO: ProcessCDR(1,14563817,1,1,2)  
[2025-02-26 19:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:10:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:10:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:10:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563817', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563817', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:10:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:10:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:10:24] Production.INFO: ==2953== Releasing lock...  
[2025-02-26 19:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:10:24] Production.INFO: 51.5 MB  #Memory Used#   
[2025-02-26 19:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:11:05
    [end_date_ymd] => 2025-02-26 19:11:05
    [RateCDR] => 1
)
  
[2025-02-26 19:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:11:05' and `end` < '2025-02-26 19:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:11:17] Production.INFO: count ==3033  
[2025-02-26 19:11:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:11:05 - End Time 2025-02-26 19:11:05  
[2025-02-26 19:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563822', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563822', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563822', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563822', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:11:18] Production.INFO: ProcessCDR(1,14563822,1,1,2)  
[2025-02-26 19:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563822', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563822', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:11:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:11:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:11:23] Production.INFO: ==3031== Releasing lock...  
[2025-02-26 19:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:11:23] Production.INFO: 50.5 MB  #Memory Used#   
[2025-02-26 19:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:12:05
    [end_date_ymd] => 2025-02-26 19:12:05
    [RateCDR] => 1
)
  
[2025-02-26 19:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:12:05' and `end` < '2025-02-26 19:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:12:18] Production.INFO: count ==3023  
[2025-02-26 19:12:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:12:05 - End Time 2025-02-26 19:12:05  
[2025-02-26 19:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563827', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563827', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563827', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563827', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:12:19] Production.INFO: ProcessCDR(1,14563827,1,1,2)  
[2025-02-26 19:12:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:12:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:12:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:12:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563827', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563827', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:12:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:12:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:12:23] Production.INFO: ==3182== Releasing lock...  
[2025-02-26 19:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:12:23] Production.INFO: 50.5 MB  #Memory Used#   
[2025-02-26 19:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:13:05
    [end_date_ymd] => 2025-02-26 19:13:05
    [RateCDR] => 1
)
  
[2025-02-26 19:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:13:05' and `end` < '2025-02-26 19:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:13:17] Production.INFO: count ==3017  
[2025-02-26 19:13:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:13:05 - End Time 2025-02-26 19:13:05  
[2025-02-26 19:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563832', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563832', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563832', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563832', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:13:18] Production.INFO: ProcessCDR(1,14563832,1,1,2)  
[2025-02-26 19:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:13:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:13:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:13:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:13:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563832', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563832', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:13:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:13:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:13:23] Production.INFO: ==3258== Releasing lock...  
[2025-02-26 19:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:13:23] Production.INFO: 51 MB  #Memory Used#   
[2025-02-26 19:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:14:05
    [end_date_ymd] => 2025-02-26 19:14:05
    [RateCDR] => 1
)
  
[2025-02-26 19:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:14:05' and `end` < '2025-02-26 19:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:14:17] Production.INFO: count ==3013  
[2025-02-26 19:14:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:14:05 - End Time 2025-02-26 19:14:05  
[2025-02-26 19:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563837', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563837', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563837', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563837', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:14:18] Production.INFO: ProcessCDR(1,14563837,1,1,2)  
[2025-02-26 19:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563837', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563837', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:14:22] Production.INFO: ==3332== Releasing lock...  
[2025-02-26 19:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:14:22] Production.INFO: 50.5 MB  #Memory Used#   
[2025-02-26 19:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:15:06
    [end_date_ymd] => 2025-02-26 19:15:06
    [RateCDR] => 1
)
  
[2025-02-26 19:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:15:06' and `end` < '2025-02-26 19:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:15:18] Production.INFO: count ==2993  
[2025-02-26 19:15:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:15:06 - End Time 2025-02-26 19:15:06  
[2025-02-26 19:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563842', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563842', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563842', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563842', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:15:19] Production.INFO: ProcessCDR(1,14563842,1,1,2)  
[2025-02-26 19:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:15:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:15:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563842', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563842', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:15:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:15:24] Production.INFO: ==3485== Releasing lock...  
[2025-02-26 19:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:15:24] Production.INFO: 50.75 MB  #Memory Used#   
[2025-02-26 19:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:16:05
    [end_date_ymd] => 2025-02-26 19:16:05
    [RateCDR] => 1
)
  
[2025-02-26 19:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:16:05' and `end` < '2025-02-26 19:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:16:18] Production.INFO: count ==2975  
[2025-02-26 19:16:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:16:05 - End Time 2025-02-26 19:16:05  
[2025-02-26 19:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563847', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563847', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563847', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563847', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:16:18] Production.INFO: ProcessCDR(1,14563847,1,1,2)  
[2025-02-26 19:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:16:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:16:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563847', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563847', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:16:22] Production.INFO: ==3558== Releasing lock...  
[2025-02-26 19:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:16:22] Production.INFO: 50 MB  #Memory Used#   
[2025-02-26 19:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:17:06
    [end_date_ymd] => 2025-02-26 19:17:06
    [RateCDR] => 1
)
  
[2025-02-26 19:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:17:06' and `end` < '2025-02-26 19:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:17:19] Production.INFO: count ==2970  
[2025-02-26 19:17:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:17:06 - End Time 2025-02-26 19:17:06  
[2025-02-26 19:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563852', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563852', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563852', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563852', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:17:19] Production.INFO: ProcessCDR(1,14563852,1,1,2)  
[2025-02-26 19:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:17:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:17:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563852', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563852', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:17:23] Production.INFO: ==3635== Releasing lock...  
[2025-02-26 19:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:17:23] Production.INFO: 50 MB  #Memory Used#   
[2025-02-26 19:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:18:05
    [end_date_ymd] => 2025-02-26 19:18:05
    [RateCDR] => 1
)
  
[2025-02-26 19:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:18:05' and `end` < '2025-02-26 19:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:18:18] Production.INFO: count ==2937  
[2025-02-26 19:18:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:18:05 - End Time 2025-02-26 19:18:05  
[2025-02-26 19:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563857', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563857', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563857', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563857', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:18:18] Production.INFO: ProcessCDR(1,14563857,1,1,2)  
[2025-02-26 19:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:18:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:18:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:18:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:18:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563857', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:18:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563857', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:18:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:18:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:18:23] Production.INFO: ==3748== Releasing lock...  
[2025-02-26 19:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:18:23] Production.INFO: 50 MB  #Memory Used#   
[2025-02-26 19:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:19:06
    [end_date_ymd] => 2025-02-26 19:19:06
    [RateCDR] => 1
)
  
[2025-02-26 19:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:19:06' and `end` < '2025-02-26 19:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:19:18] Production.INFO: count ==2914  
[2025-02-26 19:19:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:19:06 - End Time 2025-02-26 19:19:06  
[2025-02-26 19:19:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563862', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563862', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563862', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563862', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:19:19] Production.INFO: ProcessCDR(1,14563862,1,1,2)  
[2025-02-26 19:19:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:19:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:19:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:19:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563862', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563862', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:19:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:19:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:19:24] Production.INFO: ==3822== Releasing lock...  
[2025-02-26 19:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:19:24] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:20:06
    [end_date_ymd] => 2025-02-26 19:20:06
    [RateCDR] => 1
)
  
[2025-02-26 19:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:20:06' and `end` < '2025-02-26 19:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:20:18] Production.INFO: count ==2922  
[2025-02-26 19:20:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:20:06 - End Time 2025-02-26 19:20:06  
[2025-02-26 19:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563868', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563868', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563868', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563868', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:20:19] Production.INFO: ProcessCDR(1,14563868,1,1,2)  
[2025-02-26 19:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:20:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563868', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563868', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:20:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:20:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:20:24] Production.INFO: ==3904== Releasing lock...  
[2025-02-26 19:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:20:24] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:21:05
    [end_date_ymd] => 2025-02-26 19:21:05
    [RateCDR] => 1
)
  
[2025-02-26 19:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:21:05' and `end` < '2025-02-26 19:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:21:18] Production.INFO: count ==2903  
[2025-02-26 19:21:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:21:05 - End Time 2025-02-26 19:21:05  
[2025-02-26 19:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563873', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563873', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563873', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563873', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:21:19] Production.INFO: ProcessCDR(1,14563873,1,1,2)  
[2025-02-26 19:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563873', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563873', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:21:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:21:22] Production.INFO: ==3980== Releasing lock...  
[2025-02-26 19:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:21:22] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:22:05
    [end_date_ymd] => 2025-02-26 19:22:05
    [RateCDR] => 1
)
  
[2025-02-26 19:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:22:05' and `end` < '2025-02-26 19:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:22:18] Production.INFO: count ==2906  
[2025-02-26 19:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:22:05 - End Time 2025-02-26 19:22:05  
[2025-02-26 19:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563878', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563878', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563878', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563878', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:22:18] Production.INFO: ProcessCDR(1,14563878,1,1,2)  
[2025-02-26 19:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563878', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563878', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:22:23] Production.INFO: ==4062== Releasing lock...  
[2025-02-26 19:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:22:23] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:23:05
    [end_date_ymd] => 2025-02-26 19:23:05
    [RateCDR] => 1
)
  
[2025-02-26 19:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:23:05' and `end` < '2025-02-26 19:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:23:18] Production.INFO: count ==2892  
[2025-02-26 19:23:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:23:05 - End Time 2025-02-26 19:23:05  
[2025-02-26 19:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563883', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563883', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563883', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563883', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:23:18] Production.INFO: ProcessCDR(1,14563883,1,1,2)  
[2025-02-26 19:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:23:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:23:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:23:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563883', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563883', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:23:22] Production.INFO: ==4142== Releasing lock...  
[2025-02-26 19:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:23:22] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:24:05
    [end_date_ymd] => 2025-02-26 19:24:05
    [RateCDR] => 1
)
  
[2025-02-26 19:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:24:05' and `end` < '2025-02-26 19:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:24:17] Production.INFO: count ==2887  
[2025-02-26 19:24:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:24:05 - End Time 2025-02-26 19:24:05  
[2025-02-26 19:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563888', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563888', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563888', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563888', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:24:18] Production.INFO: ProcessCDR(1,14563888,1,1,2)  
[2025-02-26 19:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:24:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:24:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563888', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563888', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:24:22] Production.INFO: ==4216== Releasing lock...  
[2025-02-26 19:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:24:22] Production.INFO: 50 MB  #Memory Used#   
[2025-02-26 19:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:25:05
    [end_date_ymd] => 2025-02-26 19:25:05
    [RateCDR] => 1
)
  
[2025-02-26 19:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:25:05' and `end` < '2025-02-26 19:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:25:17] Production.INFO: count ==2876  
[2025-02-26 19:25:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:25:05 - End Time 2025-02-26 19:25:05  
[2025-02-26 19:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563893', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563893', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563893', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563893', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:25:18] Production.INFO: ProcessCDR(1,14563893,1,1,2)  
[2025-02-26 19:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:25:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:25:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563893', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563893', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:25:23] Production.INFO: ==4291== Releasing lock...  
[2025-02-26 19:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:25:23] Production.INFO: 49.75 MB  #Memory Used#   
[2025-02-26 19:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:26:05
    [end_date_ymd] => 2025-02-26 19:26:05
    [RateCDR] => 1
)
  
[2025-02-26 19:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:26:05' and `end` < '2025-02-26 19:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:26:17] Production.INFO: count ==2866  
[2025-02-26 19:26:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:26:05 - End Time 2025-02-26 19:26:05  
[2025-02-26 19:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563898', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563898', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563898', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563898', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:26:18] Production.INFO: ProcessCDR(1,14563898,1,1,2)  
[2025-02-26 19:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:26:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563898', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563898', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:26:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:26:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:26:23] Production.INFO: ==4364== Releasing lock...  
[2025-02-26 19:26:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:26:23] Production.INFO: 49.5 MB  #Memory Used#   
[2025-02-26 19:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:27:05
    [end_date_ymd] => 2025-02-26 19:27:05
    [RateCDR] => 1
)
  
[2025-02-26 19:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:27:05' and `end` < '2025-02-26 19:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:27:18] Production.INFO: count ==2843  
[2025-02-26 19:27:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:27:05 - End Time 2025-02-26 19:27:05  
[2025-02-26 19:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563903', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563903', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563903', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563903', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:27:18] Production.INFO: ProcessCDR(1,14563903,1,1,2)  
[2025-02-26 19:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563903', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563903', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:27:22] Production.INFO: ==4439== Releasing lock...  
[2025-02-26 19:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:27:22] Production.INFO: 49.5 MB  #Memory Used#   
[2025-02-26 19:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:28:05
    [end_date_ymd] => 2025-02-26 19:28:05
    [RateCDR] => 1
)
  
[2025-02-26 19:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:28:05' and `end` < '2025-02-26 19:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:28:17] Production.INFO: count ==2827  
[2025-02-26 19:28:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:28:05 - End Time 2025-02-26 19:28:05  
[2025-02-26 19:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563908', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563908', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563908', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563908', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:28:18] Production.INFO: ProcessCDR(1,14563908,1,1,2)  
[2025-02-26 19:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563908', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563908', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:28:21] Production.INFO: ==4515== Releasing lock...  
[2025-02-26 19:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:28:21] Production.INFO: 49.25 MB  #Memory Used#   
[2025-02-26 19:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:29:06
    [end_date_ymd] => 2025-02-26 19:29:06
    [RateCDR] => 1
)
  
[2025-02-26 19:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:29:06' and `end` < '2025-02-26 19:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:29:18] Production.INFO: count ==2795  
[2025-02-26 19:29:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:29:06 - End Time 2025-02-26 19:29:06  
[2025-02-26 19:29:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563913', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563913', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563913', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563913', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:29:19] Production.INFO: ProcessCDR(1,14563913,1,1,2)  
[2025-02-26 19:29:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:29:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:29:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:29:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:29:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563913', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:29:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563913', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:29:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:29:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:29:22] Production.INFO: ==4598== Releasing lock...  
[2025-02-26 19:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:29:22] Production.INFO: 49 MB  #Memory Used#   
[2025-02-26 19:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:30:05
    [end_date_ymd] => 2025-02-26 19:30:05
    [RateCDR] => 1
)
  
[2025-02-26 19:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:30:05' and `end` < '2025-02-26 19:30:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:30:17] Production.INFO: count ==2783  
[2025-02-26 19:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:30:05 - End Time 2025-02-26 19:30:05  
[2025-02-26 19:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563918', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563918', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563918', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563918', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:30:18] Production.INFO: ProcessCDR(1,14563918,1,1,2)  
[2025-02-26 19:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:30:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:30:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:30:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563918', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563918', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:30:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:30:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:30:23] Production.INFO: ==4675== Releasing lock...  
[2025-02-26 19:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:30:23] Production.INFO: 49 MB  #Memory Used#   
[2025-02-26 19:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:31:05
    [end_date_ymd] => 2025-02-26 19:31:05
    [RateCDR] => 1
)
  
[2025-02-26 19:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:31:05' and `end` < '2025-02-26 19:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:31:18] Production.INFO: count ==2691  
[2025-02-26 19:31:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:31:05 - End Time 2025-02-26 19:31:05  
[2025-02-26 19:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563924', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563924', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563924', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563924', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:31:19] Production.INFO: ProcessCDR(1,14563924,1,1,2)  
[2025-02-26 19:31:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:31:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:31:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:31:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563924', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563924', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:31:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:31:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:31:23] Production.INFO: ==4750== Releasing lock...  
[2025-02-26 19:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:31:23] Production.INFO: 48 MB  #Memory Used#   
[2025-02-26 19:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:32:05
    [end_date_ymd] => 2025-02-26 19:32:05
    [RateCDR] => 1
)
  
[2025-02-26 19:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:32:05' and `end` < '2025-02-26 19:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:32:17] Production.INFO: count ==2694  
[2025-02-26 19:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:32:05 - End Time 2025-02-26 19:32:05  
[2025-02-26 19:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563929', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563929', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563929', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563929', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:32:18] Production.INFO: ProcessCDR(1,14563929,1,1,2)  
[2025-02-26 19:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:32:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:32:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:32:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563929', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563929', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:32:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:32:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:32:22] Production.INFO: ==4824== Releasing lock...  
[2025-02-26 19:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:32:22] Production.INFO: 48 MB  #Memory Used#   
[2025-02-26 19:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:33:06
    [end_date_ymd] => 2025-02-26 19:33:06
    [RateCDR] => 1
)
  
[2025-02-26 19:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:33:06' and `end` < '2025-02-26 19:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:33:18] Production.INFO: count ==2685  
[2025-02-26 19:33:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:33:06 - End Time 2025-02-26 19:33:06  
[2025-02-26 19:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563934', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563934', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563934', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563934', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:33:19] Production.INFO: ProcessCDR(1,14563934,1,1,2)  
[2025-02-26 19:33:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:33:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:33:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563934', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563934', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:33:22] Production.INFO: ==4900== Releasing lock...  
[2025-02-26 19:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:33:22] Production.INFO: 48.5 MB  #Memory Used#   
[2025-02-26 19:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:34:05
    [end_date_ymd] => 2025-02-26 19:34:05
    [RateCDR] => 1
)
  
[2025-02-26 19:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:34:05' and `end` < '2025-02-26 19:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:34:17] Production.INFO: count ==2676  
[2025-02-26 19:34:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:34:05 - End Time 2025-02-26 19:34:05  
[2025-02-26 19:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563939', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563939', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563939', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563939', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:34:18] Production.INFO: ProcessCDR(1,14563939,1,1,2)  
[2025-02-26 19:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:34:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563939', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563939', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:34:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:34:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:34:23] Production.INFO: ==5019== Releasing lock...  
[2025-02-26 19:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:34:23] Production.INFO: 48.25 MB  #Memory Used#   
[2025-02-26 19:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:35:06
    [end_date_ymd] => 2025-02-26 19:35:06
    [RateCDR] => 1
)
  
[2025-02-26 19:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:35:06' and `end` < '2025-02-26 19:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:35:18] Production.INFO: count ==2675  
[2025-02-26 19:35:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:35:06 - End Time 2025-02-26 19:35:06  
[2025-02-26 19:35:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563944', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563944', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563944', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563944', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:35:19] Production.INFO: ProcessCDR(1,14563944,1,1,2)  
[2025-02-26 19:35:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:35:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:35:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:35:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563944', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563944', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:35:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:35:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:35:23] Production.INFO: ==5094== Releasing lock...  
[2025-02-26 19:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:35:23] Production.INFO: 48.25 MB  #Memory Used#   
[2025-02-26 19:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:36:05
    [end_date_ymd] => 2025-02-26 19:36:05
    [RateCDR] => 1
)
  
[2025-02-26 19:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:36:05' and `end` < '2025-02-26 19:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:36:17] Production.INFO: count ==2669  
[2025-02-26 19:36:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:36:05 - End Time 2025-02-26 19:36:05  
[2025-02-26 19:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563949', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563949', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563949', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563949', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:36:18] Production.INFO: ProcessCDR(1,14563949,1,1,2)  
[2025-02-26 19:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:36:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563949', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563949', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:36:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:36:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:36:22] Production.INFO: ==5167== Releasing lock...  
[2025-02-26 19:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:36:22] Production.INFO: 48 MB  #Memory Used#   
[2025-02-26 19:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:37:06
    [end_date_ymd] => 2025-02-26 19:37:06
    [RateCDR] => 1
)
  
[2025-02-26 19:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:37:06' and `end` < '2025-02-26 19:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:37:18] Production.INFO: count ==2652  
[2025-02-26 19:37:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:37:06 - End Time 2025-02-26 19:37:06  
[2025-02-26 19:37:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563954', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563954', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563954', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563954', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:37:19] Production.INFO: ProcessCDR(1,14563954,1,1,2)  
[2025-02-26 19:37:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:37:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:37:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:37:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563954', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563954', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:37:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:37:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:37:24] Production.INFO: ==5239== Releasing lock...  
[2025-02-26 19:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:37:24] Production.INFO: 48 MB  #Memory Used#   
[2025-02-26 19:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:38:05
    [end_date_ymd] => 2025-02-26 19:38:05
    [RateCDR] => 1
)
  
[2025-02-26 19:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:38:05' and `end` < '2025-02-26 19:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:38:17] Production.INFO: count ==2641  
[2025-02-26 19:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:38:05 - End Time 2025-02-26 19:38:05  
[2025-02-26 19:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563959', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563959', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563959', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563959', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:38:18] Production.INFO: ProcessCDR(1,14563959,1,1,2)  
[2025-02-26 19:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563959', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:38:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563959', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:38:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:38:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:38:23] Production.INFO: ==5311== Releasing lock...  
[2025-02-26 19:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:38:23] Production.INFO: 48.25 MB  #Memory Used#   
[2025-02-26 19:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:39:06
    [end_date_ymd] => 2025-02-26 19:39:06
    [RateCDR] => 1
)
  
[2025-02-26 19:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:39:06' and `end` < '2025-02-26 19:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:39:18] Production.INFO: count ==2639  
[2025-02-26 19:39:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:39:06 - End Time 2025-02-26 19:39:06  
[2025-02-26 19:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563964', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563964', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563964', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563964', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:39:19] Production.INFO: ProcessCDR(1,14563964,1,1,2)  
[2025-02-26 19:39:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:39:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:39:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:39:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563964', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563964', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:39:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:39:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:39:23] Production.INFO: ==5385== Releasing lock...  
[2025-02-26 19:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:39:23] Production.INFO: 47.75 MB  #Memory Used#   
[2025-02-26 19:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:40:06
    [end_date_ymd] => 2025-02-26 19:40:06
    [RateCDR] => 1
)
  
[2025-02-26 19:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:40:06' and `end` < '2025-02-26 19:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:40:18] Production.INFO: count ==2621  
[2025-02-26 19:40:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:40:06 - End Time 2025-02-26 19:40:06  
[2025-02-26 19:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563970', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563970', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563970', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563970', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:40:19] Production.INFO: ProcessCDR(1,14563970,1,1,2)  
[2025-02-26 19:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563970', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563970', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:40:23] Production.INFO: ==5457== Releasing lock...  
[2025-02-26 19:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:40:23] Production.INFO: 47.75 MB  #Memory Used#   
[2025-02-26 19:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:41:05
    [end_date_ymd] => 2025-02-26 19:41:05
    [RateCDR] => 1
)
  
[2025-02-26 19:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:41:05' and `end` < '2025-02-26 19:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:41:18] Production.INFO: count ==2590  
[2025-02-26 19:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:41:05 - End Time 2025-02-26 19:41:05  
[2025-02-26 19:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563975', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563975', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563975', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563975', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:41:18] Production.INFO: ProcessCDR(1,14563975,1,1,2)  
[2025-02-26 19:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:41:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:41:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:41:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563975', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563975', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:41:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:41:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:41:23] Production.INFO: ==5530== Releasing lock...  
[2025-02-26 19:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:41:23] Production.INFO: 47.5 MB  #Memory Used#   
[2025-02-26 19:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:42:05
    [end_date_ymd] => 2025-02-26 19:42:05
    [RateCDR] => 1
)
  
[2025-02-26 19:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:42:05' and `end` < '2025-02-26 19:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:42:17] Production.INFO: count ==2583  
[2025-02-26 19:42:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:42:05 - End Time 2025-02-26 19:42:05  
[2025-02-26 19:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563980', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563980', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563980', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563980', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:42:18] Production.INFO: ProcessCDR(1,14563980,1,1,2)  
[2025-02-26 19:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563980', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563980', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:42:21] Production.INFO: ==5606== Releasing lock...  
[2025-02-26 19:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:42:21] Production.INFO: 47.5 MB  #Memory Used#   
[2025-02-26 19:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:43:06
    [end_date_ymd] => 2025-02-26 19:43:06
    [RateCDR] => 1
)
  
[2025-02-26 19:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:43:06' and `end` < '2025-02-26 19:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:43:18] Production.INFO: count ==2579  
[2025-02-26 19:43:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:43:06 - End Time 2025-02-26 19:43:06  
[2025-02-26 19:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563985', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563985', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563985', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563985', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:43:19] Production.INFO: ProcessCDR(1,14563985,1,1,2)  
[2025-02-26 19:43:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:43:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:43:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:43:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563985', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563985', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:43:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:43:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:43:24] Production.INFO: ==5677== Releasing lock...  
[2025-02-26 19:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:43:24] Production.INFO: 47.5 MB  #Memory Used#   
[2025-02-26 19:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:44:05
    [end_date_ymd] => 2025-02-26 19:44:05
    [RateCDR] => 1
)
  
[2025-02-26 19:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:44:05' and `end` < '2025-02-26 19:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:44:17] Production.INFO: count ==2573  
[2025-02-26 19:44:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:44:05 - End Time 2025-02-26 19:44:05  
[2025-02-26 19:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563990', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563990', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563990', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563990', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:44:18] Production.INFO: ProcessCDR(1,14563990,1,1,2)  
[2025-02-26 19:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:44:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:44:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:44:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563990', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563990', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:44:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:44:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:44:22] Production.INFO: ==5747== Releasing lock...  
[2025-02-26 19:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:44:22] Production.INFO: 47 MB  #Memory Used#   
[2025-02-26 19:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:45:05
    [end_date_ymd] => 2025-02-26 19:45:05
    [RateCDR] => 1
)
  
[2025-02-26 19:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:45:05' and `end` < '2025-02-26 19:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:45:17] Production.INFO: count ==2560  
[2025-02-26 19:45:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:45:05 - End Time 2025-02-26 19:45:05  
[2025-02-26 19:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563995', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14563995', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563995', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14563995', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:45:18] Production.INFO: ProcessCDR(1,14563995,1,1,2)  
[2025-02-26 19:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14563995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14563995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14563995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14563995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563995', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14563995', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:45:21] Production.INFO: ==5820== Releasing lock...  
[2025-02-26 19:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:45:21] Production.INFO: 47.25 MB  #Memory Used#   
[2025-02-26 19:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:46:05
    [end_date_ymd] => 2025-02-26 19:46:05
    [RateCDR] => 1
)
  
[2025-02-26 19:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:46:05' and `end` < '2025-02-26 19:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:46:17] Production.INFO: count ==2531  
[2025-02-26 19:46:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:46:05 - End Time 2025-02-26 19:46:05  
[2025-02-26 19:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564000', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564000', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564000', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564000', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:46:18] Production.INFO: ProcessCDR(1,14564000,1,1,2)  
[2025-02-26 19:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564000', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564000', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:46:21] Production.INFO: ==5893== Releasing lock...  
[2025-02-26 19:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:46:21] Production.INFO: 47 MB  #Memory Used#   
[2025-02-26 19:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:47:05
    [end_date_ymd] => 2025-02-26 19:47:05
    [RateCDR] => 1
)
  
[2025-02-26 19:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:47:05' and `end` < '2025-02-26 19:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:47:18] Production.INFO: count ==2523  
[2025-02-26 19:47:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:47:05 - End Time 2025-02-26 19:47:05  
[2025-02-26 19:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564005', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564005', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564005', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564005', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:47:18] Production.INFO: ProcessCDR(1,14564005,1,1,2)  
[2025-02-26 19:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:47:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:47:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:47:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564005', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564005', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:47:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:47:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:47:23] Production.INFO: ==5966== Releasing lock...  
[2025-02-26 19:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:47:23] Production.INFO: 47 MB  #Memory Used#   
[2025-02-26 19:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:48:05
    [end_date_ymd] => 2025-02-26 19:48:05
    [RateCDR] => 1
)
  
[2025-02-26 19:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:48:05' and `end` < '2025-02-26 19:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:48:17] Production.INFO: count ==2506  
[2025-02-26 19:48:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:48:05 - End Time 2025-02-26 19:48:05  
[2025-02-26 19:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564010', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564010', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564010', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564010', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:48:18] Production.INFO: ProcessCDR(1,14564010,1,1,2)  
[2025-02-26 19:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:48:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:48:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:48:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564010', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564010', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:48:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:48:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:48:23] Production.INFO: ==6040== Releasing lock...  
[2025-02-26 19:48:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:48:23] Production.INFO: 46.75 MB  #Memory Used#   
[2025-02-26 19:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:49:06
    [end_date_ymd] => 2025-02-26 19:49:06
    [RateCDR] => 1
)
  
[2025-02-26 19:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:49:06' and `end` < '2025-02-26 19:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:49:18] Production.INFO: count ==2493  
[2025-02-26 19:49:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:49:06 - End Time 2025-02-26 19:49:06  
[2025-02-26 19:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564015', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564015', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564015', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564015', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:49:19] Production.INFO: ProcessCDR(1,14564015,1,1,2)  
[2025-02-26 19:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:49:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:49:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564015', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:49:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564015', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:49:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:49:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:49:23] Production.INFO: ==6152== Releasing lock...  
[2025-02-26 19:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:49:23] Production.INFO: 46.75 MB  #Memory Used#   
[2025-02-26 19:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:50:06
    [end_date_ymd] => 2025-02-26 19:50:06
    [RateCDR] => 1
)
  
[2025-02-26 19:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:50:06' and `end` < '2025-02-26 19:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:50:18] Production.INFO: count ==2494  
[2025-02-26 19:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:50:06 - End Time 2025-02-26 19:50:06  
[2025-02-26 19:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564021', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564021', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564021', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564021', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:50:19] Production.INFO: ProcessCDR(1,14564021,1,1,2)  
[2025-02-26 19:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564021', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564021', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:50:22] Production.INFO: ==6225== Releasing lock...  
[2025-02-26 19:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:50:22] Production.INFO: 46.75 MB  #Memory Used#   
[2025-02-26 19:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:51:05
    [end_date_ymd] => 2025-02-26 19:51:05
    [RateCDR] => 1
)
  
[2025-02-26 19:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:51:05' and `end` < '2025-02-26 19:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:51:17] Production.INFO: count ==2434  
[2025-02-26 19:51:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:51:05 - End Time 2025-02-26 19:51:05  
[2025-02-26 19:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564026', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564026', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564026', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564026', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:51:18] Production.INFO: ProcessCDR(1,14564026,1,1,2)  
[2025-02-26 19:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:51:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:51:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:51:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564026', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564026', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:51:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:51:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:51:23] Production.INFO: ==6297== Releasing lock...  
[2025-02-26 19:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:51:23] Production.INFO: 46.25 MB  #Memory Used#   
[2025-02-26 19:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:52:05
    [end_date_ymd] => 2025-02-26 19:52:05
    [RateCDR] => 1
)
  
[2025-02-26 19:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:52:05' and `end` < '2025-02-26 19:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:52:17] Production.INFO: count ==2425  
[2025-02-26 19:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:52:05 - End Time 2025-02-26 19:52:05  
[2025-02-26 19:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564031', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564031', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564031', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564031', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:52:18] Production.INFO: ProcessCDR(1,14564031,1,1,2)  
[2025-02-26 19:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564031', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564031', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:52:21] Production.INFO: ==6369== Releasing lock...  
[2025-02-26 19:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:52:21] Production.INFO: 46.25 MB  #Memory Used#   
[2025-02-26 19:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:53:05
    [end_date_ymd] => 2025-02-26 19:53:05
    [RateCDR] => 1
)
  
[2025-02-26 19:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:53:05' and `end` < '2025-02-26 19:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:53:18] Production.INFO: count ==2396  
[2025-02-26 19:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:53:05 - End Time 2025-02-26 19:53:05  
[2025-02-26 19:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564036', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564036', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564036', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564036', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:53:18] Production.INFO: ProcessCDR(1,14564036,1,1,2)  
[2025-02-26 19:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564036', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564036', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:53:22] Production.INFO: ==6441== Releasing lock...  
[2025-02-26 19:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:53:22] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 19:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:54:05
    [end_date_ymd] => 2025-02-26 19:54:05
    [RateCDR] => 1
)
  
[2025-02-26 19:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:54:05' and `end` < '2025-02-26 19:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:54:17] Production.INFO: count ==2379  
[2025-02-26 19:54:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:54:05 - End Time 2025-02-26 19:54:05  
[2025-02-26 19:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564041', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564041', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564041', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564041', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:54:18] Production.INFO: ProcessCDR(1,14564041,1,1,2)  
[2025-02-26 19:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564041', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564041', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:54:22] Production.INFO: ==6511== Releasing lock...  
[2025-02-26 19:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:54:22] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 19:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:55:06
    [end_date_ymd] => 2025-02-26 19:55:06
    [RateCDR] => 1
)
  
[2025-02-26 19:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:55:06' and `end` < '2025-02-26 19:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:55:18] Production.INFO: count ==2376  
[2025-02-26 19:55:19] Production.ERROR: pbx CDR StartTime 2025-02-26 16:55:06 - End Time 2025-02-26 19:55:06  
[2025-02-26 19:55:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564046', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564046', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564046', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564046', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:55:19] Production.INFO: ProcessCDR(1,14564046,1,1,2)  
[2025-02-26 19:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564046', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564046', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:55:22] Production.INFO: ==6584== Releasing lock...  
[2025-02-26 19:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:55:22] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 19:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:56:05
    [end_date_ymd] => 2025-02-26 19:56:05
    [RateCDR] => 1
)
  
[2025-02-26 19:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:56:05' and `end` < '2025-02-26 19:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:56:17] Production.INFO: count ==2376  
[2025-02-26 19:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:56:05 - End Time 2025-02-26 19:56:05  
[2025-02-26 19:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564051', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564051', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564051', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564051', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:56:18] Production.INFO: ProcessCDR(1,14564051,1,1,2)  
[2025-02-26 19:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:56:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:56:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:56:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564051', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564051', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:56:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:56:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:56:23] Production.INFO: ==6654== Releasing lock...  
[2025-02-26 19:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:56:23] Production.INFO: 46 MB  #Memory Used#   
[2025-02-26 19:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:57:05
    [end_date_ymd] => 2025-02-26 19:57:05
    [RateCDR] => 1
)
  
[2025-02-26 19:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:57:05' and `end` < '2025-02-26 19:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:57:17] Production.INFO: count ==2368  
[2025-02-26 19:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:57:05 - End Time 2025-02-26 19:57:05  
[2025-02-26 19:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564056', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564056', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564056', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564056', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:57:18] Production.INFO: ProcessCDR(1,14564056,1,1,2)  
[2025-02-26 19:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564056', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564056', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:57:21] Production.INFO: ==6724== Releasing lock...  
[2025-02-26 19:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:57:21] Production.INFO: 45.75 MB  #Memory Used#   
[2025-02-26 19:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:58:05
    [end_date_ymd] => 2025-02-26 19:58:05
    [RateCDR] => 1
)
  
[2025-02-26 19:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:58:05' and `end` < '2025-02-26 19:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:58:17] Production.INFO: count ==2351  
[2025-02-26 19:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:58:05 - End Time 2025-02-26 19:58:05  
[2025-02-26 19:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564061', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564061', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:58:18] Production.INFO: ProcessCDR(1,14564061,1,1,2)  
[2025-02-26 19:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:58:21] Production.INFO: ==6796== Releasing lock...  
[2025-02-26 19:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:58:21] Production.INFO: 45.75 MB  #Memory Used#   
[2025-02-26 19:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 16:59:05
    [end_date_ymd] => 2025-02-26 19:59:05
    [RateCDR] => 1
)
  
[2025-02-26 19:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 16:59:05' and `end` < '2025-02-26 19:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 19:59:17] Production.INFO: count ==2345  
[2025-02-26 19:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 16:59:05 - End Time 2025-02-26 19:59:05  
[2025-02-26 19:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 19:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564066', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564066', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564066', 'tblTempVendorCDR_20' ) start  
[2025-02-26 19:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564066', 'tblTempVendorCDR_20' ) end  
[2025-02-26 19:59:18] Production.INFO: ProcessCDR(1,14564066,1,1,2)  
[2025-02-26 19:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 19:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 19:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564066', 'tblTempUsageDetail_20' ) start  
[2025-02-26 19:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564066', 'tblTempUsageDetail_20' ) end  
[2025-02-26 19:59:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 19:59:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 19:59:23] Production.INFO: ==6866== Releasing lock...  
[2025-02-26 19:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 19:59:23] Production.INFO: 45.75 MB  #Memory Used#   
[2025-02-26 20:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:00:06
    [end_date_ymd] => 2025-02-26 20:00:06
    [RateCDR] => 1
)
  
[2025-02-26 20:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:00:06' and `end` < '2025-02-26 20:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:00:18] Production.INFO: count ==2331  
[2025-02-26 20:00:19] Production.ERROR: pbx CDR StartTime 2025-02-26 17:00:06 - End Time 2025-02-26 20:00:06  
[2025-02-26 20:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564072', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564072', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564072', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564072', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:00:19] Production.INFO: ProcessCDR(1,14564072,1,1,2)  
[2025-02-26 20:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564072', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564072', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:00:22] Production.INFO: ==6941== Releasing lock...  
[2025-02-26 20:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:00:22] Production.INFO: 45.5 MB  #Memory Used#   
[2025-02-26 20:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:01:05
    [end_date_ymd] => 2025-02-26 20:01:05
    [RateCDR] => 1
)
  
[2025-02-26 20:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:01:05' and `end` < '2025-02-26 20:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:01:17] Production.INFO: count ==2240  
[2025-02-26 20:01:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:01:05 - End Time 2025-02-26 20:01:05  
[2025-02-26 20:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564077', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564077', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564077', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564077', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:01:18] Production.INFO: ProcessCDR(1,14564077,1,1,2)  
[2025-02-26 20:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564077', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564077', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:01:23] Production.INFO: ==7071== Releasing lock...  
[2025-02-26 20:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:01:23] Production.INFO: 44.75 MB  #Memory Used#   
[2025-02-26 20:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:02:06
    [end_date_ymd] => 2025-02-26 20:02:06
    [RateCDR] => 1
)
  
[2025-02-26 20:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:02:06' and `end` < '2025-02-26 20:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:02:18] Production.INFO: count ==2227  
[2025-02-26 20:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:02:06 - End Time 2025-02-26 20:02:06  
[2025-02-26 20:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564082', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564082', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564082', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564082', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:02:18] Production.INFO: ProcessCDR(1,14564082,1,1,2)  
[2025-02-26 20:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564082', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564082', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:02:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:02:23] Production.INFO: ==7143== Releasing lock...  
[2025-02-26 20:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:02:23] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 20:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:03:05
    [end_date_ymd] => 2025-02-26 20:03:05
    [RateCDR] => 1
)
  
[2025-02-26 20:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:03:05' and `end` < '2025-02-26 20:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:03:17] Production.INFO: count ==2220  
[2025-02-26 20:03:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:03:05 - End Time 2025-02-26 20:03:05  
[2025-02-26 20:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564087', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564087', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564087', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564087', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:03:18] Production.INFO: ProcessCDR(1,14564087,1,1,2)  
[2025-02-26 20:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:03:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:03:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:03:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564087', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564087', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:03:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:03:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:03:23] Production.INFO: ==7213== Releasing lock...  
[2025-02-26 20:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:03:23] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 20:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:04:05
    [end_date_ymd] => 2025-02-26 20:04:05
    [RateCDR] => 1
)
  
[2025-02-26 20:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:04:05' and `end` < '2025-02-26 20:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:04:17] Production.INFO: count ==2213  
[2025-02-26 20:04:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:04:05 - End Time 2025-02-26 20:04:05  
[2025-02-26 20:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564092', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564092', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564092', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564092', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:04:18] Production.INFO: ProcessCDR(1,14564092,1,1,2)  
[2025-02-26 20:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564092', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564092', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:04:21] Production.INFO: ==7284== Releasing lock...  
[2025-02-26 20:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:04:21] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 20:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:05:05
    [end_date_ymd] => 2025-02-26 20:05:05
    [RateCDR] => 1
)
  
[2025-02-26 20:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:05:05' and `end` < '2025-02-26 20:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:05:17] Production.INFO: count ==2208  
[2025-02-26 20:05:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:05:05 - End Time 2025-02-26 20:05:05  
[2025-02-26 20:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564097', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564097', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564097', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564097', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:05:18] Production.INFO: ProcessCDR(1,14564097,1,1,2)  
[2025-02-26 20:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564097', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564097', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:05:22] Production.INFO: ==7394== Releasing lock...  
[2025-02-26 20:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:05:22] Production.INFO: 44.75 MB  #Memory Used#   
[2025-02-26 20:06:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:06:04
    [end_date_ymd] => 2025-02-26 20:06:04
    [RateCDR] => 1
)
  
[2025-02-26 20:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:06:04' and `end` < '2025-02-26 20:06:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:06:17] Production.INFO: count ==2205  
[2025-02-26 20:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:06:04 - End Time 2025-02-26 20:06:04  
[2025-02-26 20:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564102', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564102', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564102', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564102', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:06:17] Production.INFO: ProcessCDR(1,14564102,1,1,2)  
[2025-02-26 20:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:06:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564102', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:06:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564102', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:06:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:06:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:06:20] Production.INFO: ==7467== Releasing lock...  
[2025-02-26 20:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:06:20] Production.INFO: 44.25 MB  #Memory Used#   
[2025-02-26 20:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:07:06
    [end_date_ymd] => 2025-02-26 20:07:06
    [RateCDR] => 1
)
  
[2025-02-26 20:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:07:06' and `end` < '2025-02-26 20:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:07:18] Production.INFO: count ==2195  
[2025-02-26 20:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:07:06 - End Time 2025-02-26 20:07:06  
[2025-02-26 20:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564107', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564107', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564107', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564107', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:07:18] Production.INFO: ProcessCDR(1,14564107,1,1,2)  
[2025-02-26 20:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564107', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564107', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:07:21] Production.INFO: ==7539== Releasing lock...  
[2025-02-26 20:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:07:21] Production.INFO: 44.25 MB  #Memory Used#   
[2025-02-26 20:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:08:05
    [end_date_ymd] => 2025-02-26 20:08:05
    [RateCDR] => 1
)
  
[2025-02-26 20:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:08:05' and `end` < '2025-02-26 20:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:08:17] Production.INFO: count ==2182  
[2025-02-26 20:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:08:05 - End Time 2025-02-26 20:08:05  
[2025-02-26 20:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564112', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564112', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564112', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564112', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:08:18] Production.INFO: ProcessCDR(1,14564112,1,1,2)  
[2025-02-26 20:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564112', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564112', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:08:21] Production.INFO: ==7609== Releasing lock...  
[2025-02-26 20:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:08:21] Production.INFO: 44.5 MB  #Memory Used#   
[2025-02-26 20:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:09:05
    [end_date_ymd] => 2025-02-26 20:09:05
    [RateCDR] => 1
)
  
[2025-02-26 20:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:09:05' and `end` < '2025-02-26 20:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:09:17] Production.INFO: count ==2168  
[2025-02-26 20:09:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:09:05 - End Time 2025-02-26 20:09:05  
[2025-02-26 20:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564117', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564117', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564117', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564117', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:09:18] Production.INFO: ProcessCDR(1,14564117,1,1,2)  
[2025-02-26 20:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564117', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564117', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:09:21] Production.INFO: ==7682== Releasing lock...  
[2025-02-26 20:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:09:21] Production.INFO: 44.25 MB  #Memory Used#   
[2025-02-26 20:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:10:05
    [end_date_ymd] => 2025-02-26 20:10:05
    [RateCDR] => 1
)
  
[2025-02-26 20:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:10:05' and `end` < '2025-02-26 20:10:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:10:18] Production.INFO: count ==2161  
[2025-02-26 20:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:10:05 - End Time 2025-02-26 20:10:05  
[2025-02-26 20:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564123', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564123', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564123', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564123', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:10:18] Production.INFO: ProcessCDR(1,14564123,1,1,2)  
[2025-02-26 20:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564123', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564123', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:10:22] Production.INFO: ==7754== Releasing lock...  
[2025-02-26 20:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:10:22] Production.INFO: 44 MB  #Memory Used#   
[2025-02-26 20:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:11:05
    [end_date_ymd] => 2025-02-26 20:11:05
    [RateCDR] => 1
)
  
[2025-02-26 20:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:11:05' and `end` < '2025-02-26 20:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:11:17] Production.INFO: count ==2133  
[2025-02-26 20:11:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:11:05 - End Time 2025-02-26 20:11:05  
[2025-02-26 20:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564128', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564128', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564128', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564128', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:11:18] Production.INFO: ProcessCDR(1,14564128,1,1,2)  
[2025-02-26 20:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564128', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564128', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:11:21] Production.INFO: ==7830== Releasing lock...  
[2025-02-26 20:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:11:21] Production.INFO: 44 MB  #Memory Used#   
[2025-02-26 20:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:12:05
    [end_date_ymd] => 2025-02-26 20:12:05
    [RateCDR] => 1
)
  
[2025-02-26 20:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:12:05' and `end` < '2025-02-26 20:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:12:17] Production.INFO: count ==2127  
[2025-02-26 20:12:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:12:05 - End Time 2025-02-26 20:12:05  
[2025-02-26 20:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564133', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564133', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564133', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564133', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:12:18] Production.INFO: ProcessCDR(1,14564133,1,1,2)  
[2025-02-26 20:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:12:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:12:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:12:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564133', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564133', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:12:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:12:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:12:23] Production.INFO: ==7902== Releasing lock...  
[2025-02-26 20:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:12:23] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:13:05
    [end_date_ymd] => 2025-02-26 20:13:05
    [RateCDR] => 1
)
  
[2025-02-26 20:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:13:05' and `end` < '2025-02-26 20:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:13:18] Production.INFO: count ==2114  
[2025-02-26 20:13:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:13:05 - End Time 2025-02-26 20:13:05  
[2025-02-26 20:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564138', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564138', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564138', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564138', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:13:18] Production.INFO: ProcessCDR(1,14564138,1,1,2)  
[2025-02-26 20:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:13:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:13:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:13:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564138', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564138', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:13:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:13:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:13:23] Production.INFO: ==7973== Releasing lock...  
[2025-02-26 20:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:13:23] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:14:06
    [end_date_ymd] => 2025-02-26 20:14:06
    [RateCDR] => 1
)
  
[2025-02-26 20:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:14:06' and `end` < '2025-02-26 20:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:14:18] Production.INFO: count ==2096  
[2025-02-26 20:14:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:14:06 - End Time 2025-02-26 20:14:06  
[2025-02-26 20:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564143', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564143', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564143', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564143', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:14:19] Production.INFO: ProcessCDR(1,14564143,1,1,2)  
[2025-02-26 20:14:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:14:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:14:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:14:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:14:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564143', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564143', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:14:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:14:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:14:24] Production.INFO: ==8043== Releasing lock...  
[2025-02-26 20:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:14:24] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:15:05
    [end_date_ymd] => 2025-02-26 20:15:05
    [RateCDR] => 1
)
  
[2025-02-26 20:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:15:05' and `end` < '2025-02-26 20:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:15:17] Production.INFO: count ==2093  
[2025-02-26 20:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:15:05 - End Time 2025-02-26 20:15:05  
[2025-02-26 20:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564148', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564148', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564148', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564148', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:15:18] Production.INFO: ProcessCDR(1,14564148,1,1,2)  
[2025-02-26 20:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564148', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564148', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:15:21] Production.INFO: ==8123== Releasing lock...  
[2025-02-26 20:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:15:21] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:16:05
    [end_date_ymd] => 2025-02-26 20:16:05
    [RateCDR] => 1
)
  
[2025-02-26 20:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:16:05' and `end` < '2025-02-26 20:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:16:17] Production.INFO: count ==2086  
[2025-02-26 20:16:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:16:05 - End Time 2025-02-26 20:16:05  
[2025-02-26 20:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564153', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564153', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564153', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564153', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:16:18] Production.INFO: ProcessCDR(1,14564153,1,1,2)  
[2025-02-26 20:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564153', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564153', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:16:21] Production.INFO: ==8203== Releasing lock...  
[2025-02-26 20:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:16:21] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:17:06
    [end_date_ymd] => 2025-02-26 20:17:06
    [RateCDR] => 1
)
  
[2025-02-26 20:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:17:06' and `end` < '2025-02-26 20:17:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:17:18] Production.INFO: count ==2091  
[2025-02-26 20:17:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:17:06 - End Time 2025-02-26 20:17:06  
[2025-02-26 20:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564158', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564158', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564158', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564158', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:17:18] Production.INFO: ProcessCDR(1,14564158,1,1,2)  
[2025-02-26 20:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:17:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:17:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564158', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564158', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:17:23] Production.INFO: ==8276== Releasing lock...  
[2025-02-26 20:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:17:23] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:18:05
    [end_date_ymd] => 2025-02-26 20:18:05
    [RateCDR] => 1
)
  
[2025-02-26 20:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:18:05' and `end` < '2025-02-26 20:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:18:17] Production.INFO: count ==2084  
[2025-02-26 20:18:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:18:05 - End Time 2025-02-26 20:18:05  
[2025-02-26 20:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564163', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564163', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564163', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564163', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:18:18] Production.INFO: ProcessCDR(1,14564163,1,1,2)  
[2025-02-26 20:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564163', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564163', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:18:22] Production.INFO: ==8357== Releasing lock...  
[2025-02-26 20:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:18:22] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:19:05
    [end_date_ymd] => 2025-02-26 20:19:05
    [RateCDR] => 1
)
  
[2025-02-26 20:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:19:05' and `end` < '2025-02-26 20:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:19:17] Production.INFO: count ==2099  
[2025-02-26 20:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:19:05 - End Time 2025-02-26 20:19:05  
[2025-02-26 20:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564168', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564168', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564168', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564168', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:19:17] Production.INFO: ProcessCDR(1,14564168,1,1,2)  
[2025-02-26 20:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564168', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564168', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:19:21] Production.INFO: ==8431== Releasing lock...  
[2025-02-26 20:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:19:21] Production.INFO: 43.75 MB  #Memory Used#   
[2025-02-26 20:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:20:06
    [end_date_ymd] => 2025-02-26 20:20:06
    [RateCDR] => 1
)
  
[2025-02-26 20:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:20:06' and `end` < '2025-02-26 20:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:20:18] Production.INFO: count ==2106  
[2025-02-26 20:20:19] Production.ERROR: pbx CDR StartTime 2025-02-26 17:20:06 - End Time 2025-02-26 20:20:06  
[2025-02-26 20:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564174', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564174', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564174', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564174', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:20:19] Production.INFO: ProcessCDR(1,14564174,1,1,2)  
[2025-02-26 20:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564174', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564174', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:20:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:20:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:20:23] Production.INFO: ==8548== Releasing lock...  
[2025-02-26 20:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:20:23] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:21:05
    [end_date_ymd] => 2025-02-26 20:21:05
    [RateCDR] => 1
)
  
[2025-02-26 20:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:21:05' and `end` < '2025-02-26 20:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:21:17] Production.INFO: count ==2062  
[2025-02-26 20:21:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:21:05 - End Time 2025-02-26 20:21:05  
[2025-02-26 20:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564179', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564179', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564179', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564179', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:21:18] Production.INFO: ProcessCDR(1,14564179,1,1,2)  
[2025-02-26 20:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564179', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564179', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:21:21] Production.INFO: ==8622== Releasing lock...  
[2025-02-26 20:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:21:21] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:22:05
    [end_date_ymd] => 2025-02-26 20:22:05
    [RateCDR] => 1
)
  
[2025-02-26 20:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:22:05' and `end` < '2025-02-26 20:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:22:18] Production.INFO: count ==2066  
[2025-02-26 20:22:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:22:05 - End Time 2025-02-26 20:22:05  
[2025-02-26 20:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564184', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564184', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564184', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564184', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:22:18] Production.INFO: ProcessCDR(1,14564184,1,1,2)  
[2025-02-26 20:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564184', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564184', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:22:23] Production.INFO: ==8697== Releasing lock...  
[2025-02-26 20:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:22:23] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:23:05
    [end_date_ymd] => 2025-02-26 20:23:05
    [RateCDR] => 1
)
  
[2025-02-26 20:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:23:05' and `end` < '2025-02-26 20:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:23:17] Production.INFO: count ==2044  
[2025-02-26 20:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:23:05 - End Time 2025-02-26 20:23:05  
[2025-02-26 20:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564189', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564189', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564189', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564189', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:23:17] Production.INFO: ProcessCDR(1,14564189,1,1,2)  
[2025-02-26 20:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564189', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564189', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:23:21] Production.INFO: ==8767== Releasing lock...  
[2025-02-26 20:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:23:21] Production.INFO: 43 MB  #Memory Used#   
[2025-02-26 20:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:24:06
    [end_date_ymd] => 2025-02-26 20:24:06
    [RateCDR] => 1
)
  
[2025-02-26 20:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:24:06' and `end` < '2025-02-26 20:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:24:18] Production.INFO: count ==2041  
[2025-02-26 20:24:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:24:06 - End Time 2025-02-26 20:24:06  
[2025-02-26 20:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564194', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564194', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564194', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564194', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:24:18] Production.INFO: ProcessCDR(1,14564194,1,1,2)  
[2025-02-26 20:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564194', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564194', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:24:22] Production.INFO: ==8848== Releasing lock...  
[2025-02-26 20:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:24:22] Production.INFO: 43.25 MB  #Memory Used#   
[2025-02-26 20:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:25:05
    [end_date_ymd] => 2025-02-26 20:25:05
    [RateCDR] => 1
)
  
[2025-02-26 20:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:25:05' and `end` < '2025-02-26 20:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:25:17] Production.INFO: count ==2046  
[2025-02-26 20:25:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:25:05 - End Time 2025-02-26 20:25:05  
[2025-02-26 20:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564199', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564199', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564199', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564199', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:25:18] Production.INFO: ProcessCDR(1,14564199,1,1,2)  
[2025-02-26 20:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564199', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564199', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:25:21] Production.INFO: ==8919== Releasing lock...  
[2025-02-26 20:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:25:21] Production.INFO: 43.25 MB  #Memory Used#   
[2025-02-26 20:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:26:05
    [end_date_ymd] => 2025-02-26 20:26:05
    [RateCDR] => 1
)
  
[2025-02-26 20:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:26:05' and `end` < '2025-02-26 20:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:26:17] Production.INFO: count ==2054  
[2025-02-26 20:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:26:05 - End Time 2025-02-26 20:26:05  
[2025-02-26 20:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564204', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564204', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564204', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564204', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:26:18] Production.INFO: ProcessCDR(1,14564204,1,1,2)  
[2025-02-26 20:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564204', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564204', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:26:21] Production.INFO: ==8992== Releasing lock...  
[2025-02-26 20:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:26:21] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:27:05
    [end_date_ymd] => 2025-02-26 20:27:05
    [RateCDR] => 1
)
  
[2025-02-26 20:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:27:05' and `end` < '2025-02-26 20:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:27:17] Production.INFO: count ==2055  
[2025-02-26 20:27:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:27:05 - End Time 2025-02-26 20:27:05  
[2025-02-26 20:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564209', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564209', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564209', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564209', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:27:18] Production.INFO: ProcessCDR(1,14564209,1,1,2)  
[2025-02-26 20:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564209', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564209', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:27:22] Production.INFO: ==9064== Releasing lock...  
[2025-02-26 20:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:27:22] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:28:05
    [end_date_ymd] => 2025-02-26 20:28:05
    [RateCDR] => 1
)
  
[2025-02-26 20:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:28:05' and `end` < '2025-02-26 20:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:28:17] Production.INFO: count ==2053  
[2025-02-26 20:28:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:28:05 - End Time 2025-02-26 20:28:05  
[2025-02-26 20:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564214', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564214', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564214', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564214', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:28:18] Production.INFO: ProcessCDR(1,14564214,1,1,2)  
[2025-02-26 20:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564214', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564214', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:28:21] Production.INFO: ==9136== Releasing lock...  
[2025-02-26 20:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:28:21] Production.INFO: 43.5 MB  #Memory Used#   
[2025-02-26 20:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:29:05
    [end_date_ymd] => 2025-02-26 20:29:05
    [RateCDR] => 1
)
  
[2025-02-26 20:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:29:05' and `end` < '2025-02-26 20:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:29:18] Production.INFO: count ==2051  
[2025-02-26 20:29:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:29:05 - End Time 2025-02-26 20:29:05  
[2025-02-26 20:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564219', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564219', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564219', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564219', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:29:18] Production.INFO: ProcessCDR(1,14564219,1,1,2)  
[2025-02-26 20:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564219', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564219', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:29:21] Production.INFO: ==9214== Releasing lock...  
[2025-02-26 20:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:29:21] Production.INFO: 43.25 MB  #Memory Used#   
[2025-02-26 20:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:30:06
    [end_date_ymd] => 2025-02-26 20:30:06
    [RateCDR] => 1
)
  
[2025-02-26 20:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:30:06' and `end` < '2025-02-26 20:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:30:18] Production.INFO: count ==2026  
[2025-02-26 20:30:19] Production.ERROR: pbx CDR StartTime 2025-02-26 17:30:06 - End Time 2025-02-26 20:30:06  
[2025-02-26 20:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564225', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564225', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564225', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564225', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:30:19] Production.INFO: ProcessCDR(1,14564225,1,1,2)  
[2025-02-26 20:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564225', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564225', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:30:22] Production.INFO: ==9287== Releasing lock...  
[2025-02-26 20:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:30:22] Production.INFO: 43 MB  #Memory Used#   
[2025-02-26 20:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:31:05
    [end_date_ymd] => 2025-02-26 20:31:05
    [RateCDR] => 1
)
  
[2025-02-26 20:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:31:05' and `end` < '2025-02-26 20:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:31:17] Production.INFO: count ==1999  
[2025-02-26 20:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:31:05 - End Time 2025-02-26 20:31:05  
[2025-02-26 20:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564230', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564230', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564230', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564230', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:31:18] Production.INFO: ProcessCDR(1,14564230,1,1,2)  
[2025-02-26 20:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564230', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564230', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:31:21] Production.INFO: ==9365== Releasing lock...  
[2025-02-26 20:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:31:21] Production.INFO: 42.75 MB  #Memory Used#   
[2025-02-26 20:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:32:05
    [end_date_ymd] => 2025-02-26 20:32:05
    [RateCDR] => 1
)
  
[2025-02-26 20:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:32:05' and `end` < '2025-02-26 20:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:32:17] Production.INFO: count ==1976  
[2025-02-26 20:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:32:05 - End Time 2025-02-26 20:32:05  
[2025-02-26 20:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564235', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564235', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564235', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564235', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:32:18] Production.INFO: ProcessCDR(1,14564235,1,1,2)  
[2025-02-26 20:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564235', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564235', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:32:21] Production.INFO: ==9449== Releasing lock...  
[2025-02-26 20:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:32:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:33:05
    [end_date_ymd] => 2025-02-26 20:33:05
    [RateCDR] => 1
)
  
[2025-02-26 20:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:33:05' and `end` < '2025-02-26 20:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:33:17] Production.INFO: count ==1966  
[2025-02-26 20:33:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:33:05 - End Time 2025-02-26 20:33:05  
[2025-02-26 20:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564240', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564240', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564240', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564240', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:33:18] Production.INFO: ProcessCDR(1,14564240,1,1,2)  
[2025-02-26 20:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564240', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564240', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:33:21] Production.INFO: ==9533== Releasing lock...  
[2025-02-26 20:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:33:21] Production.INFO: 42.75 MB  #Memory Used#   
[2025-02-26 20:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:34:06
    [end_date_ymd] => 2025-02-26 20:34:06
    [RateCDR] => 1
)
  
[2025-02-26 20:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:34:06' and `end` < '2025-02-26 20:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:34:18] Production.INFO: count ==1967  
[2025-02-26 20:34:19] Production.ERROR: pbx CDR StartTime 2025-02-26 17:34:06 - End Time 2025-02-26 20:34:06  
[2025-02-26 20:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564245', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564245', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564245', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564245', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:34:19] Production.INFO: ProcessCDR(1,14564245,1,1,2)  
[2025-02-26 20:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:34:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564245', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564245', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:34:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:34:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:34:23] Production.INFO: ==9617== Releasing lock...  
[2025-02-26 20:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:34:23] Production.INFO: 43 MB  #Memory Used#   
[2025-02-26 20:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:35:05
    [end_date_ymd] => 2025-02-26 20:35:05
    [RateCDR] => 1
)
  
[2025-02-26 20:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:35:05' and `end` < '2025-02-26 20:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:35:17] Production.INFO: count ==1961  
[2025-02-26 20:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:35:05 - End Time 2025-02-26 20:35:05  
[2025-02-26 20:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564250', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564250', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564250', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564250', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:35:17] Production.INFO: ProcessCDR(1,14564250,1,1,2)  
[2025-02-26 20:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564250', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564250', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:35:21] Production.INFO: ==9699== Releasing lock...  
[2025-02-26 20:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:35:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:36:05
    [end_date_ymd] => 2025-02-26 20:36:05
    [RateCDR] => 1
)
  
[2025-02-26 20:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:36:05' and `end` < '2025-02-26 20:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:36:17] Production.INFO: count ==1950  
[2025-02-26 20:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:36:05 - End Time 2025-02-26 20:36:05  
[2025-02-26 20:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564255', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564255', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564255', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564255', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:36:17] Production.INFO: ProcessCDR(1,14564255,1,1,2)  
[2025-02-26 20:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564255', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564255', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:36:21] Production.INFO: ==9821== Releasing lock...  
[2025-02-26 20:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:36:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:37:05
    [end_date_ymd] => 2025-02-26 20:37:05
    [RateCDR] => 1
)
  
[2025-02-26 20:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:37:05' and `end` < '2025-02-26 20:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:37:17] Production.INFO: count ==1937  
[2025-02-26 20:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:37:05 - End Time 2025-02-26 20:37:05  
[2025-02-26 20:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564260', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564260', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564260', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564260', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:37:18] Production.INFO: ProcessCDR(1,14564260,1,1,2)  
[2025-02-26 20:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564260', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564260', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:37:21] Production.INFO: ==9903== Releasing lock...  
[2025-02-26 20:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:37:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:38:05
    [end_date_ymd] => 2025-02-26 20:38:05
    [RateCDR] => 1
)
  
[2025-02-26 20:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:38:05' and `end` < '2025-02-26 20:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:38:17] Production.INFO: count ==1934  
[2025-02-26 20:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:38:05 - End Time 2025-02-26 20:38:05  
[2025-02-26 20:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564265', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564265', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564265', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564265', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:38:18] Production.INFO: ProcessCDR(1,14564265,1,1,2)  
[2025-02-26 20:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564265', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564265', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:38:21] Production.INFO: ==9984== Releasing lock...  
[2025-02-26 20:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:38:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:39:05
    [end_date_ymd] => 2025-02-26 20:39:05
    [RateCDR] => 1
)
  
[2025-02-26 20:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:39:05' and `end` < '2025-02-26 20:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:39:17] Production.INFO: count ==1930  
[2025-02-26 20:39:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:39:05 - End Time 2025-02-26 20:39:05  
[2025-02-26 20:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564270', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564270', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564270', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564270', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:39:18] Production.INFO: ProcessCDR(1,14564270,1,1,2)  
[2025-02-26 20:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:39:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:39:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564270', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564270', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:39:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:39:23] Production.INFO: ==10064== Releasing lock...  
[2025-02-26 20:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:39:23] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 20:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:40:06
    [end_date_ymd] => 2025-02-26 20:40:06
    [RateCDR] => 1
)
  
[2025-02-26 20:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:40:06' and `end` < '2025-02-26 20:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:40:18] Production.INFO: count ==1937  
[2025-02-26 20:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:40:06 - End Time 2025-02-26 20:40:06  
[2025-02-26 20:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564275', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564275', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564275', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564275', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:40:18] Production.INFO: ProcessCDR(1,14564275,1,1,2)  
[2025-02-26 20:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564275', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564275', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:40:21] Production.INFO: ==10151== Releasing lock...  
[2025-02-26 20:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:40:21] Production.INFO: 42.5 MB  #Memory Used#   
[2025-02-26 20:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:41:05
    [end_date_ymd] => 2025-02-26 20:41:05
    [RateCDR] => 1
)
  
[2025-02-26 20:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:41:05' and `end` < '2025-02-26 20:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:41:17] Production.INFO: count ==1868  
[2025-02-26 20:41:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:41:05 - End Time 2025-02-26 20:41:05  
[2025-02-26 20:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564281', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564281', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564281', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564281', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:41:17] Production.INFO: ProcessCDR(1,14564281,1,1,2)  
[2025-02-26 20:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564281', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564281', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:41:21] Production.INFO: ==10231== Releasing lock...  
[2025-02-26 20:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:41:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 20:42:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:42:04
    [end_date_ymd] => 2025-02-26 20:42:04
    [RateCDR] => 1
)
  
[2025-02-26 20:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:42:04' and `end` < '2025-02-26 20:42:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:42:17] Production.INFO: count ==1866  
[2025-02-26 20:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:42:04 - End Time 2025-02-26 20:42:04  
[2025-02-26 20:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564286', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564286', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564286', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564286', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:42:17] Production.INFO: ProcessCDR(1,14564286,1,1,2)  
[2025-02-26 20:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564286', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564286', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:42:22] Production.INFO: ==10305== Releasing lock...  
[2025-02-26 20:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:42:22] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 20:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:43:05
    [end_date_ymd] => 2025-02-26 20:43:05
    [RateCDR] => 1
)
  
[2025-02-26 20:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:43:05' and `end` < '2025-02-26 20:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:43:18] Production.INFO: count ==1853  
[2025-02-26 20:43:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:43:05 - End Time 2025-02-26 20:43:05  
[2025-02-26 20:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564291', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564291', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564291', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564291', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:43:18] Production.INFO: ProcessCDR(1,14564291,1,1,2)  
[2025-02-26 20:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564291', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564291', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:43:21] Production.INFO: ==10379== Releasing lock...  
[2025-02-26 20:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:43:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 20:44:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:44:04
    [end_date_ymd] => 2025-02-26 20:44:04
    [RateCDR] => 1
)
  
[2025-02-26 20:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:44:04' and `end` < '2025-02-26 20:44:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:44:17] Production.INFO: count ==1864  
[2025-02-26 20:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:44:04 - End Time 2025-02-26 20:44:04  
[2025-02-26 20:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564296', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564296', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564296', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564296', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:44:17] Production.INFO: ProcessCDR(1,14564296,1,1,2)  
[2025-02-26 20:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564296', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564296', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:44:20] Production.INFO: ==10448== Releasing lock...  
[2025-02-26 20:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:44:20] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:45:05
    [end_date_ymd] => 2025-02-26 20:45:05
    [RateCDR] => 1
)
  
[2025-02-26 20:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:45:05' and `end` < '2025-02-26 20:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:45:17] Production.INFO: count ==1860  
[2025-02-26 20:45:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:45:05 - End Time 2025-02-26 20:45:05  
[2025-02-26 20:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564301', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564301', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564301', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564301', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:45:18] Production.INFO: ProcessCDR(1,14564301,1,1,2)  
[2025-02-26 20:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564301', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564301', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:45:21] Production.INFO: ==10521== Releasing lock...  
[2025-02-26 20:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:45:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 20:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:46:05
    [end_date_ymd] => 2025-02-26 20:46:05
    [RateCDR] => 1
)
  
[2025-02-26 20:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:46:05' and `end` < '2025-02-26 20:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:46:18] Production.INFO: count ==1858  
[2025-02-26 20:46:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:46:05 - End Time 2025-02-26 20:46:05  
[2025-02-26 20:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564306', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564306', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564306', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564306', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:46:18] Production.INFO: ProcessCDR(1,14564306,1,1,2)  
[2025-02-26 20:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564306', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564306', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:46:21] Production.INFO: ==10594== Releasing lock...  
[2025-02-26 20:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:46:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:47:05
    [end_date_ymd] => 2025-02-26 20:47:05
    [RateCDR] => 1
)
  
[2025-02-26 20:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:47:05' and `end` < '2025-02-26 20:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:47:17] Production.INFO: count ==1854  
[2025-02-26 20:47:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:47:05 - End Time 2025-02-26 20:47:05  
[2025-02-26 20:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564311', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564311', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564311', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564311', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:47:18] Production.INFO: ProcessCDR(1,14564311,1,1,2)  
[2025-02-26 20:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:47:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:47:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:47:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564311', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564311', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:47:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:47:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:47:23] Production.INFO: ==10666== Releasing lock...  
[2025-02-26 20:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:47:23] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 20:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:48:05
    [end_date_ymd] => 2025-02-26 20:48:05
    [RateCDR] => 1
)
  
[2025-02-26 20:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:48:05' and `end` < '2025-02-26 20:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:48:17] Production.INFO: count ==1845  
[2025-02-26 20:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:48:05 - End Time 2025-02-26 20:48:05  
[2025-02-26 20:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564316', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564316', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564316', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564316', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:48:17] Production.INFO: ProcessCDR(1,14564316,1,1,2)  
[2025-02-26 20:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564316', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564316', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:48:21] Production.INFO: ==10737== Releasing lock...  
[2025-02-26 20:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:48:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:49:05
    [end_date_ymd] => 2025-02-26 20:49:05
    [RateCDR] => 1
)
  
[2025-02-26 20:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:49:05' and `end` < '2025-02-26 20:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:49:18] Production.INFO: count ==1838  
[2025-02-26 20:49:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:49:05 - End Time 2025-02-26 20:49:05  
[2025-02-26 20:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564321', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564321', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564321', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564321', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:49:18] Production.INFO: ProcessCDR(1,14564321,1,1,2)  
[2025-02-26 20:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564321', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564321', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:49:21] Production.INFO: ==10809== Releasing lock...  
[2025-02-26 20:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:49:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:50:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:50:07
    [end_date_ymd] => 2025-02-26 20:50:07
    [RateCDR] => 1
)
  
[2025-02-26 20:50:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:50:07' and `end` < '2025-02-26 20:50:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:50:19] Production.INFO: count ==1836  
[2025-02-26 20:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 17:50:07 - End Time 2025-02-26 20:50:07  
[2025-02-26 20:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564327', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564327', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564327', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564327', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:50:19] Production.INFO: ProcessCDR(1,14564327,1,1,2)  
[2025-02-26 20:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564327', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564327', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:50:22] Production.INFO: ==10881== Releasing lock...  
[2025-02-26 20:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:50:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:51:05
    [end_date_ymd] => 2025-02-26 20:51:05
    [RateCDR] => 1
)
  
[2025-02-26 20:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:51:05' and `end` < '2025-02-26 20:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:51:17] Production.INFO: count ==1748  
[2025-02-26 20:51:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:51:05 - End Time 2025-02-26 20:51:05  
[2025-02-26 20:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564332', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564332', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564332', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564332', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:51:18] Production.INFO: ProcessCDR(1,14564332,1,1,2)  
[2025-02-26 20:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564332', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564332', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:51:21] Production.INFO: ==10992== Releasing lock...  
[2025-02-26 20:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:51:21] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 20:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:52:06
    [end_date_ymd] => 2025-02-26 20:52:06
    [RateCDR] => 1
)
  
[2025-02-26 20:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:52:06' and `end` < '2025-02-26 20:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:52:18] Production.INFO: count ==1810  
[2025-02-26 20:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:52:06 - End Time 2025-02-26 20:52:06  
[2025-02-26 20:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564337', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564337', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564337', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564337', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:52:18] Production.INFO: ProcessCDR(1,14564337,1,1,2)  
[2025-02-26 20:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:52:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564337', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564337', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:52:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:52:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:52:23] Production.INFO: ==11062== Releasing lock...  
[2025-02-26 20:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:52:23] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 20:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:53:05
    [end_date_ymd] => 2025-02-26 20:53:05
    [RateCDR] => 1
)
  
[2025-02-26 20:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:53:05' and `end` < '2025-02-26 20:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:53:17] Production.INFO: count ==1815  
[2025-02-26 20:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:53:05 - End Time 2025-02-26 20:53:05  
[2025-02-26 20:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564342', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564342', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564342', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564342', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:53:18] Production.INFO: ProcessCDR(1,14564342,1,1,2)  
[2025-02-26 20:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:53:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:53:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564342', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564342', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:53:22] Production.INFO: ==11138== Releasing lock...  
[2025-02-26 20:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:53:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:54:05
    [end_date_ymd] => 2025-02-26 20:54:05
    [RateCDR] => 1
)
  
[2025-02-26 20:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:54:05' and `end` < '2025-02-26 20:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:54:17] Production.INFO: count ==1814  
[2025-02-26 20:54:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:54:05 - End Time 2025-02-26 20:54:05  
[2025-02-26 20:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564347', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564347', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564347', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564347', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:54:18] Production.INFO: ProcessCDR(1,14564347,1,1,2)  
[2025-02-26 20:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564347', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564347', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:54:22] Production.INFO: ==11211== Releasing lock...  
[2025-02-26 20:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:54:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:55:05
    [end_date_ymd] => 2025-02-26 20:55:05
    [RateCDR] => 1
)
  
[2025-02-26 20:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:55:05' and `end` < '2025-02-26 20:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:55:17] Production.INFO: count ==1813  
[2025-02-26 20:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:55:05 - End Time 2025-02-26 20:55:05  
[2025-02-26 20:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564352', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564352', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564352', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564352', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:55:17] Production.INFO: ProcessCDR(1,14564352,1,1,2)  
[2025-02-26 20:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564352', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564352', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:55:22] Production.INFO: ==11282== Releasing lock...  
[2025-02-26 20:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:55:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 20:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:56:05
    [end_date_ymd] => 2025-02-26 20:56:05
    [RateCDR] => 1
)
  
[2025-02-26 20:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:56:05' and `end` < '2025-02-26 20:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:56:17] Production.INFO: count ==1904  
[2025-02-26 20:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:56:05 - End Time 2025-02-26 20:56:05  
[2025-02-26 20:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564357', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564357', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564357', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564357', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:56:18] Production.INFO: ProcessCDR(1,14564357,1,1,2)  
[2025-02-26 20:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564357', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564357', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:56:21] Production.INFO: ==11356== Releasing lock...  
[2025-02-26 20:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:56:21] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 20:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:57:05
    [end_date_ymd] => 2025-02-26 20:57:05
    [RateCDR] => 1
)
  
[2025-02-26 20:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:57:05' and `end` < '2025-02-26 20:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:57:17] Production.INFO: count ==1900  
[2025-02-26 20:57:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:57:05 - End Time 2025-02-26 20:57:05  
[2025-02-26 20:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564362', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564362', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564362', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564362', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:57:17] Production.INFO: ProcessCDR(1,14564362,1,1,2)  
[2025-02-26 20:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564362', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564362', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:57:21] Production.INFO: ==11428== Releasing lock...  
[2025-02-26 20:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:57:21] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 20:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:58:05
    [end_date_ymd] => 2025-02-26 20:58:05
    [RateCDR] => 1
)
  
[2025-02-26 20:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:58:05' and `end` < '2025-02-26 20:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:58:18] Production.INFO: count ==1903  
[2025-02-26 20:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 17:58:05 - End Time 2025-02-26 20:58:05  
[2025-02-26 20:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564367', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564367', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564367', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564367', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:58:18] Production.INFO: ProcessCDR(1,14564367,1,1,2)  
[2025-02-26 20:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564367', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564367', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:58:22] Production.INFO: ==11499== Releasing lock...  
[2025-02-26 20:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:58:22] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 20:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 17:59:05
    [end_date_ymd] => 2025-02-26 20:59:05
    [RateCDR] => 1
)
  
[2025-02-26 20:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 17:59:05' and `end` < '2025-02-26 20:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 20:59:17] Production.INFO: count ==1901  
[2025-02-26 20:59:17] Production.ERROR: pbx CDR StartTime 2025-02-26 17:59:05 - End Time 2025-02-26 20:59:05  
[2025-02-26 20:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 20:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564372', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564372', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564372', 'tblTempVendorCDR_20' ) start  
[2025-02-26 20:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564372', 'tblTempVendorCDR_20' ) end  
[2025-02-26 20:59:17] Production.INFO: ProcessCDR(1,14564372,1,1,2)  
[2025-02-26 20:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564372,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564372,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 20:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564372,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564372,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 20:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564372', 'tblTempUsageDetail_20' ) start  
[2025-02-26 20:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564372', 'tblTempUsageDetail_20' ) end  
[2025-02-26 20:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 20:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 20:59:21] Production.INFO: ==11576== Releasing lock...  
[2025-02-26 20:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 20:59:21] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 21:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:00:06
    [end_date_ymd] => 2025-02-26 21:00:06
    [RateCDR] => 1
)
  
[2025-02-26 21:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:00:06' and `end` < '2025-02-26 21:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:00:18] Production.INFO: count ==1899  
[2025-02-26 21:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:00:06 - End Time 2025-02-26 21:00:06  
[2025-02-26 21:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564378', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564378', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564378', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564378', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:00:18] Production.INFO: ProcessCDR(1,14564378,1,1,2)  
[2025-02-26 21:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564378', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564378', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:00:22] Production.INFO: ==11652== Releasing lock...  
[2025-02-26 21:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:00:22] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 21:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:01:05
    [end_date_ymd] => 2025-02-26 21:01:05
    [RateCDR] => 1
)
  
[2025-02-26 21:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:01:05' and `end` < '2025-02-26 21:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:01:17] Production.INFO: count ==1853  
[2025-02-26 21:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:01:05 - End Time 2025-02-26 21:01:05  
[2025-02-26 21:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564383', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564383', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564383', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564383', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:01:17] Production.INFO: ProcessCDR(1,14564383,1,1,2)  
[2025-02-26 21:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564383', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564383', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:01:21] Production.INFO: ==11735== Releasing lock...  
[2025-02-26 21:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:01:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 21:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:02:05
    [end_date_ymd] => 2025-02-26 21:02:05
    [RateCDR] => 1
)
  
[2025-02-26 21:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:02:05' and `end` < '2025-02-26 21:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:02:17] Production.INFO: count ==1853  
[2025-02-26 21:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:02:05 - End Time 2025-02-26 21:02:05  
[2025-02-26 21:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564388', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564388', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564388', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564388', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:02:18] Production.INFO: ProcessCDR(1,14564388,1,1,2)  
[2025-02-26 21:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564388', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564388', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:02:21] Production.INFO: ==11807== Releasing lock...  
[2025-02-26 21:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:02:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 21:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:03:05
    [end_date_ymd] => 2025-02-26 21:03:05
    [RateCDR] => 1
)
  
[2025-02-26 21:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:03:05' and `end` < '2025-02-26 21:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:03:17] Production.INFO: count ==1848  
[2025-02-26 21:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:03:05 - End Time 2025-02-26 21:03:05  
[2025-02-26 21:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564393', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564393', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564393', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564393', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:03:17] Production.INFO: ProcessCDR(1,14564393,1,1,2)  
[2025-02-26 21:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564393', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564393', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:03:21] Production.INFO: ==11878== Releasing lock...  
[2025-02-26 21:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:03:21] Production.INFO: 42.25 MB  #Memory Used#   
[2025-02-26 21:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:04:05
    [end_date_ymd] => 2025-02-26 21:04:05
    [RateCDR] => 1
)
  
[2025-02-26 21:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:04:05' and `end` < '2025-02-26 21:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:04:17] Production.INFO: count ==1845  
[2025-02-26 21:04:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:04:05 - End Time 2025-02-26 21:04:05  
[2025-02-26 21:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564398', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564398', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564398', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564398', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:04:18] Production.INFO: ProcessCDR(1,14564398,1,1,2)  
[2025-02-26 21:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:04:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:04:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564398', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564398', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:04:22] Production.INFO: ==11949== Releasing lock...  
[2025-02-26 21:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:04:22] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:05:05
    [end_date_ymd] => 2025-02-26 21:05:05
    [RateCDR] => 1
)
  
[2025-02-26 21:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:05:05' and `end` < '2025-02-26 21:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:05:17] Production.INFO: count ==1843  
[2025-02-26 21:05:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:05:05 - End Time 2025-02-26 21:05:05  
[2025-02-26 21:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564403', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564403', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564403', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564403', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:05:18] Production.INFO: ProcessCDR(1,14564403,1,1,2)  
[2025-02-26 21:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564403', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564403', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:05:21] Production.INFO: ==12019== Releasing lock...  
[2025-02-26 21:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:05:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:06:05
    [end_date_ymd] => 2025-02-26 21:06:05
    [RateCDR] => 1
)
  
[2025-02-26 21:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:06:05' and `end` < '2025-02-26 21:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:06:18] Production.INFO: count ==1844  
[2025-02-26 21:06:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:06:05 - End Time 2025-02-26 21:06:05  
[2025-02-26 21:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564408', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564408', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564408', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564408', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:06:18] Production.INFO: ProcessCDR(1,14564408,1,1,2)  
[2025-02-26 21:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564408', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564408', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:06:21] Production.INFO: ==12092== Releasing lock...  
[2025-02-26 21:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:06:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:07:06
    [end_date_ymd] => 2025-02-26 21:07:06
    [RateCDR] => 1
)
  
[2025-02-26 21:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:07:06' and `end` < '2025-02-26 21:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:07:18] Production.INFO: count ==1844  
[2025-02-26 21:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:07:06 - End Time 2025-02-26 21:07:06  
[2025-02-26 21:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564413', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564413', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564413', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564413', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:07:18] Production.INFO: ProcessCDR(1,14564413,1,1,2)  
[2025-02-26 21:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564413', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564413', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:07:21] Production.INFO: ==12203== Releasing lock...  
[2025-02-26 21:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:07:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:08:05
    [end_date_ymd] => 2025-02-26 21:08:05
    [RateCDR] => 1
)
  
[2025-02-26 21:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:08:05' and `end` < '2025-02-26 21:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:08:18] Production.INFO: count ==1851  
[2025-02-26 21:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:08:05 - End Time 2025-02-26 21:08:05  
[2025-02-26 21:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564418', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564418', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564418', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564418', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:08:18] Production.INFO: ProcessCDR(1,14564418,1,1,2)  
[2025-02-26 21:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564418', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564418', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:08:21] Production.INFO: ==12276== Releasing lock...  
[2025-02-26 21:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:08:21] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 21:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:09:06
    [end_date_ymd] => 2025-02-26 21:09:06
    [RateCDR] => 1
)
  
[2025-02-26 21:09:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:09:06' and `end` < '2025-02-26 21:09:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:09:18] Production.INFO: count ==1862  
[2025-02-26 21:09:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:09:06 - End Time 2025-02-26 21:09:06  
[2025-02-26 21:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564423', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564423', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564423', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564423', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:09:18] Production.INFO: ProcessCDR(1,14564423,1,1,2)  
[2025-02-26 21:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:09:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:09:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:09:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:09:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564423', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:09:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564423', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:09:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:09:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:09:23] Production.INFO: ==12351== Releasing lock...  
[2025-02-26 21:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:09:23] Production.INFO: 42 MB  #Memory Used#   
[2025-02-26 21:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:10:06
    [end_date_ymd] => 2025-02-26 21:10:06
    [RateCDR] => 1
)
  
[2025-02-26 21:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:10:06' and `end` < '2025-02-26 21:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:10:18] Production.INFO: count ==1848  
[2025-02-26 21:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:10:06 - End Time 2025-02-26 21:10:06  
[2025-02-26 21:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564429', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564429', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564429', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564429', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:10:19] Production.INFO: ProcessCDR(1,14564429,1,1,2)  
[2025-02-26 21:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564429', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564429', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:10:22] Production.INFO: ==12429== Releasing lock...  
[2025-02-26 21:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:10:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:11:06
    [end_date_ymd] => 2025-02-26 21:11:06
    [RateCDR] => 1
)
  
[2025-02-26 21:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:11:06' and `end` < '2025-02-26 21:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:11:18] Production.INFO: count ==1821  
[2025-02-26 21:11:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:11:06 - End Time 2025-02-26 21:11:06  
[2025-02-26 21:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564434', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564434', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564434', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564434', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:11:18] Production.INFO: ProcessCDR(1,14564434,1,1,2)  
[2025-02-26 21:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:11:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564434', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564434', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:11:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:11:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:11:22] Production.INFO: ==12506== Releasing lock...  
[2025-02-26 21:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:11:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:12:05
    [end_date_ymd] => 2025-02-26 21:12:05
    [RateCDR] => 1
)
  
[2025-02-26 21:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:12:05' and `end` < '2025-02-26 21:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:12:17] Production.INFO: count ==1813  
[2025-02-26 21:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:12:05 - End Time 2025-02-26 21:12:05  
[2025-02-26 21:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564439', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564439', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564439', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564439', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:12:17] Production.INFO: ProcessCDR(1,14564439,1,1,2)  
[2025-02-26 21:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564439', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564439', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:12:21] Production.INFO: ==12575== Releasing lock...  
[2025-02-26 21:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:12:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:13:05
    [end_date_ymd] => 2025-02-26 21:13:05
    [RateCDR] => 1
)
  
[2025-02-26 21:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:13:05' and `end` < '2025-02-26 21:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:13:17] Production.INFO: count ==1800  
[2025-02-26 21:13:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:13:05 - End Time 2025-02-26 21:13:05  
[2025-02-26 21:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564444', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564444', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564444', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564444', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:13:18] Production.INFO: ProcessCDR(1,14564444,1,1,2)  
[2025-02-26 21:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564444', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564444', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:13:21] Production.INFO: ==12649== Releasing lock...  
[2025-02-26 21:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:13:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:14:05
    [end_date_ymd] => 2025-02-26 21:14:05
    [RateCDR] => 1
)
  
[2025-02-26 21:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:14:05' and `end` < '2025-02-26 21:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:14:17] Production.INFO: count ==1799  
[2025-02-26 21:14:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:14:05 - End Time 2025-02-26 21:14:05  
[2025-02-26 21:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564449', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564449', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564449', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564449', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:14:18] Production.INFO: ProcessCDR(1,14564449,1,1,2)  
[2025-02-26 21:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564449', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564449', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:14:21] Production.INFO: ==12720== Releasing lock...  
[2025-02-26 21:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:14:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:15:05
    [end_date_ymd] => 2025-02-26 21:15:05
    [RateCDR] => 1
)
  
[2025-02-26 21:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:15:05' and `end` < '2025-02-26 21:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:15:17] Production.INFO: count ==1798  
[2025-02-26 21:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:15:05 - End Time 2025-02-26 21:15:05  
[2025-02-26 21:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564454', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564454', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564454', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564454', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:15:18] Production.INFO: ProcessCDR(1,14564454,1,1,2)  
[2025-02-26 21:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564454', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564454', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:15:23] Production.INFO: ==12790== Releasing lock...  
[2025-02-26 21:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:15:23] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 21:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:16:05
    [end_date_ymd] => 2025-02-26 21:16:05
    [RateCDR] => 1
)
  
[2025-02-26 21:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:16:05' and `end` < '2025-02-26 21:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:16:17] Production.INFO: count ==1795  
[2025-02-26 21:16:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:16:05 - End Time 2025-02-26 21:16:05  
[2025-02-26 21:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564459', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564459', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564459', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564459', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:16:18] Production.INFO: ProcessCDR(1,14564459,1,1,2)  
[2025-02-26 21:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564459', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564459', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:16:21] Production.INFO: ==12862== Releasing lock...  
[2025-02-26 21:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:16:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:17:05
    [end_date_ymd] => 2025-02-26 21:17:05
    [RateCDR] => 1
)
  
[2025-02-26 21:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:17:05' and `end` < '2025-02-26 21:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:17:18] Production.INFO: count ==1798  
[2025-02-26 21:17:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:17:05 - End Time 2025-02-26 21:17:05  
[2025-02-26 21:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564464', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564464', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564464', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564464', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:17:18] Production.INFO: ProcessCDR(1,14564464,1,1,2)  
[2025-02-26 21:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564464', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564464', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:17:21] Production.INFO: ==12936== Releasing lock...  
[2025-02-26 21:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:17:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:18:05
    [end_date_ymd] => 2025-02-26 21:18:05
    [RateCDR] => 1
)
  
[2025-02-26 21:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:18:05' and `end` < '2025-02-26 21:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:18:17] Production.INFO: count ==1795  
[2025-02-26 21:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:18:05 - End Time 2025-02-26 21:18:05  
[2025-02-26 21:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564469', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564469', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564469', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564469', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:18:17] Production.INFO: ProcessCDR(1,14564469,1,1,2)  
[2025-02-26 21:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564469', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564469', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:18:21] Production.INFO: ==13011== Releasing lock...  
[2025-02-26 21:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:18:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:19:05
    [end_date_ymd] => 2025-02-26 21:19:05
    [RateCDR] => 1
)
  
[2025-02-26 21:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:19:05' and `end` < '2025-02-26 21:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:19:18] Production.INFO: count ==1794  
[2025-02-26 21:19:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:19:05 - End Time 2025-02-26 21:19:05  
[2025-02-26 21:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564474', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564474', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564474', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564474', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:19:18] Production.INFO: ProcessCDR(1,14564474,1,1,2)  
[2025-02-26 21:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564474', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564474', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:19:21] Production.INFO: ==13084== Releasing lock...  
[2025-02-26 21:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:19:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:20:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:20:05
    [end_date_ymd] => 2025-02-26 21:20:05
    [RateCDR] => 1
)
  
[2025-02-26 21:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:20:05' and `end` < '2025-02-26 21:20:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:20:17] Production.INFO: count ==1788  
[2025-02-26 21:20:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:20:05 - End Time 2025-02-26 21:20:05  
[2025-02-26 21:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564480', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564480', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564480', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564480', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:20:18] Production.INFO: ProcessCDR(1,14564480,1,1,2)  
[2025-02-26 21:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564480', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564480', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:20:21] Production.INFO: ==13156== Releasing lock...  
[2025-02-26 21:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:20:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-02-26 21:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:21:06
    [end_date_ymd] => 2025-02-26 21:21:06
    [RateCDR] => 1
)
  
[2025-02-26 21:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:21:06' and `end` < '2025-02-26 21:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:21:18] Production.INFO: count ==1761  
[2025-02-26 21:21:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:21:06 - End Time 2025-02-26 21:21:06  
[2025-02-26 21:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564485', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564485', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564485', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564485', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:21:18] Production.INFO: ProcessCDR(1,14564485,1,1,2)  
[2025-02-26 21:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564485', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564485', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:21:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:21:22] Production.INFO: ==13228== Releasing lock...  
[2025-02-26 21:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:21:22] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 21:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:22:05
    [end_date_ymd] => 2025-02-26 21:22:05
    [RateCDR] => 1
)
  
[2025-02-26 21:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:22:05' and `end` < '2025-02-26 21:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:22:17] Production.INFO: count ==1759  
[2025-02-26 21:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:22:05 - End Time 2025-02-26 21:22:05  
[2025-02-26 21:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564490', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564490', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564490', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564490', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:22:17] Production.INFO: ProcessCDR(1,14564490,1,1,2)  
[2025-02-26 21:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564490', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564490', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:22:22] Production.INFO: ==13337== Releasing lock...  
[2025-02-26 21:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:22:22] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 21:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:23:05
    [end_date_ymd] => 2025-02-26 21:23:05
    [RateCDR] => 1
)
  
[2025-02-26 21:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:23:05' and `end` < '2025-02-26 21:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:23:18] Production.INFO: count ==1752  
[2025-02-26 21:23:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:23:05 - End Time 2025-02-26 21:23:05  
[2025-02-26 21:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564495', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564495', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564495', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564495', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:23:18] Production.INFO: ProcessCDR(1,14564495,1,1,2)  
[2025-02-26 21:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564495', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564495', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:23:21] Production.INFO: ==13410== Releasing lock...  
[2025-02-26 21:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:23:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-02-26 21:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:24:05
    [end_date_ymd] => 2025-02-26 21:24:05
    [RateCDR] => 1
)
  
[2025-02-26 21:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:24:05' and `end` < '2025-02-26 21:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:24:17] Production.INFO: count ==1749  
[2025-02-26 21:24:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:24:05 - End Time 2025-02-26 21:24:05  
[2025-02-26 21:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564500', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564500', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564500', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564500', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:24:17] Production.INFO: ProcessCDR(1,14564500,1,1,2)  
[2025-02-26 21:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:24:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:24:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564500', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564500', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:24:22] Production.INFO: ==13483== Releasing lock...  
[2025-02-26 21:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:24:22] Production.INFO: 41.25 MB  #Memory Used#   
[2025-02-26 21:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:25:05
    [end_date_ymd] => 2025-02-26 21:25:05
    [RateCDR] => 1
)
  
[2025-02-26 21:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:25:05' and `end` < '2025-02-26 21:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:25:18] Production.INFO: count ==1743  
[2025-02-26 21:25:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:25:05 - End Time 2025-02-26 21:25:05  
[2025-02-26 21:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564505', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564505', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564505', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564505', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:25:18] Production.INFO: ProcessCDR(1,14564505,1,1,2)  
[2025-02-26 21:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564505', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564505', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:25:21] Production.INFO: ==13555== Releasing lock...  
[2025-02-26 21:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:25:21] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 21:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:26:05
    [end_date_ymd] => 2025-02-26 21:26:05
    [RateCDR] => 1
)
  
[2025-02-26 21:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:26:05' and `end` < '2025-02-26 21:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:26:17] Production.INFO: count ==1738  
[2025-02-26 21:26:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:26:05 - End Time 2025-02-26 21:26:05  
[2025-02-26 21:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564510', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564510', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564510', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564510', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:26:18] Production.INFO: ProcessCDR(1,14564510,1,1,2)  
[2025-02-26 21:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:26:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564510', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564510', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:26:22] Production.INFO: ==13626== Releasing lock...  
[2025-02-26 21:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:26:22] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 21:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:27:05
    [end_date_ymd] => 2025-02-26 21:27:05
    [RateCDR] => 1
)
  
[2025-02-26 21:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:27:05' and `end` < '2025-02-26 21:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:27:17] Production.INFO: count ==1735  
[2025-02-26 21:27:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:27:05 - End Time 2025-02-26 21:27:05  
[2025-02-26 21:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564515', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564515', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564515', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564515', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:27:18] Production.INFO: ProcessCDR(1,14564515,1,1,2)  
[2025-02-26 21:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564515', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564515', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:27:22] Production.INFO: ==13700== Releasing lock...  
[2025-02-26 21:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:27:22] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 21:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:28:05
    [end_date_ymd] => 2025-02-26 21:28:05
    [RateCDR] => 1
)
  
[2025-02-26 21:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:28:05' and `end` < '2025-02-26 21:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:28:17] Production.INFO: count ==1729  
[2025-02-26 21:28:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:28:05 - End Time 2025-02-26 21:28:05  
[2025-02-26 21:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564520', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564520', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564520', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564520', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:28:18] Production.INFO: ProcessCDR(1,14564520,1,1,2)  
[2025-02-26 21:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564520', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564520', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:28:21] Production.INFO: ==13772== Releasing lock...  
[2025-02-26 21:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:28:21] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 21:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:29:05
    [end_date_ymd] => 2025-02-26 21:29:05
    [RateCDR] => 1
)
  
[2025-02-26 21:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:29:05' and `end` < '2025-02-26 21:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:29:17] Production.INFO: count ==1718  
[2025-02-26 21:29:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:29:05 - End Time 2025-02-26 21:29:05  
[2025-02-26 21:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564525', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564525', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564525', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564525', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:29:18] Production.INFO: ProcessCDR(1,14564525,1,1,2)  
[2025-02-26 21:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564525', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564525', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:29:21] Production.INFO: ==13842== Releasing lock...  
[2025-02-26 21:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:29:21] Production.INFO: 41 MB  #Memory Used#   
[2025-02-26 21:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:30:05
    [end_date_ymd] => 2025-02-26 21:30:05
    [RateCDR] => 1
)
  
[2025-02-26 21:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:30:05' and `end` < '2025-02-26 21:30:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:30:17] Production.INFO: count ==1706  
[2025-02-26 21:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:30:05 - End Time 2025-02-26 21:30:05  
[2025-02-26 21:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564530', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564530', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564530', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564530', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:30:18] Production.INFO: ProcessCDR(1,14564530,1,1,2)  
[2025-02-26 21:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564530', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564530', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:30:21] Production.INFO: ==13914== Releasing lock...  
[2025-02-26 21:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:30:21] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 21:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:31:06
    [end_date_ymd] => 2025-02-26 21:31:06
    [RateCDR] => 1
)
  
[2025-02-26 21:31:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:31:06' and `end` < '2025-02-26 21:31:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:31:18] Production.INFO: count ==1692  
[2025-02-26 21:31:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:31:06 - End Time 2025-02-26 21:31:06  
[2025-02-26 21:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564536', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564536', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564536', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564536', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:31:18] Production.INFO: ProcessCDR(1,14564536,1,1,2)  
[2025-02-26 21:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564536', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564536', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:31:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:31:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:31:22] Production.INFO: ==13987== Releasing lock...  
[2025-02-26 21:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:31:22] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 21:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:32:05
    [end_date_ymd] => 2025-02-26 21:32:05
    [RateCDR] => 1
)
  
[2025-02-26 21:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:32:05' and `end` < '2025-02-26 21:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:32:17] Production.INFO: count ==1678  
[2025-02-26 21:32:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:32:05 - End Time 2025-02-26 21:32:05  
[2025-02-26 21:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564541', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564541', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564541', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564541', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:32:17] Production.INFO: ProcessCDR(1,14564541,1,1,2)  
[2025-02-26 21:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564541', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564541', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:32:21] Production.INFO: ==14056== Releasing lock...  
[2025-02-26 21:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:32:21] Production.INFO: 40.75 MB  #Memory Used#   
[2025-02-26 21:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:33:06
    [end_date_ymd] => 2025-02-26 21:33:06
    [RateCDR] => 1
)
  
[2025-02-26 21:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:33:06' and `end` < '2025-02-26 21:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:33:18] Production.INFO: count ==1669  
[2025-02-26 21:33:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:33:06 - End Time 2025-02-26 21:33:06  
[2025-02-26 21:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564546', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564546', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:33:18] Production.INFO: ProcessCDR(1,14564546,1,1,2)  
[2025-02-26 21:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564546', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564546', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:33:22] Production.INFO: ==14128== Releasing lock...  
[2025-02-26 21:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:33:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:34:06
    [end_date_ymd] => 2025-02-26 21:34:06
    [RateCDR] => 1
)
  
[2025-02-26 21:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:34:06' and `end` < '2025-02-26 21:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:34:17] Production.INFO: count ==1663  
[2025-02-26 21:34:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:34:06 - End Time 2025-02-26 21:34:06  
[2025-02-26 21:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564551', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564551', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564551', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564551', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:34:18] Production.INFO: ProcessCDR(1,14564551,1,1,2)  
[2025-02-26 21:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564551', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564551', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:34:21] Production.INFO: ==14201== Releasing lock...  
[2025-02-26 21:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:34:21] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 21:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:35:05
    [end_date_ymd] => 2025-02-26 21:35:05
    [RateCDR] => 1
)
  
[2025-02-26 21:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:35:05' and `end` < '2025-02-26 21:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:35:17] Production.INFO: count ==1663  
[2025-02-26 21:35:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:35:05 - End Time 2025-02-26 21:35:05  
[2025-02-26 21:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564556', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564556', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564556', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564556', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:35:18] Production.INFO: ProcessCDR(1,14564556,1,1,2)  
[2025-02-26 21:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:35:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:35:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:35:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564556', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564556', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:35:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:35:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:35:23] Production.INFO: ==14272== Releasing lock...  
[2025-02-26 21:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:35:23] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 21:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:36:06
    [end_date_ymd] => 2025-02-26 21:36:06
    [RateCDR] => 1
)
  
[2025-02-26 21:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:36:06' and `end` < '2025-02-26 21:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:36:18] Production.INFO: count ==1666  
[2025-02-26 21:36:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:36:06 - End Time 2025-02-26 21:36:06  
[2025-02-26 21:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564561', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564561', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564561', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564561', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:36:18] Production.INFO: ProcessCDR(1,14564561,1,1,2)  
[2025-02-26 21:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:36:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:36:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564561', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564561', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:36:23] Production.INFO: ==14342== Releasing lock...  
[2025-02-26 21:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:36:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:37:06
    [end_date_ymd] => 2025-02-26 21:37:06
    [RateCDR] => 1
)
  
[2025-02-26 21:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:37:06' and `end` < '2025-02-26 21:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:37:18] Production.INFO: count ==1675  
[2025-02-26 21:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:37:06 - End Time 2025-02-26 21:37:06  
[2025-02-26 21:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564566', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564566', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564566', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564566', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:37:18] Production.INFO: ProcessCDR(1,14564566,1,1,2)  
[2025-02-26 21:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564566', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564566', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:37:21] Production.INFO: ==14453== Releasing lock...  
[2025-02-26 21:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:37:21] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 21:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:38:06
    [end_date_ymd] => 2025-02-26 21:38:06
    [RateCDR] => 1
)
  
[2025-02-26 21:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:38:06' and `end` < '2025-02-26 21:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:38:18] Production.INFO: count ==1676  
[2025-02-26 21:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:38:06 - End Time 2025-02-26 21:38:06  
[2025-02-26 21:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564571', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564571', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564571', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564571', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:38:18] Production.INFO: ProcessCDR(1,14564571,1,1,2)  
[2025-02-26 21:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564571', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564571', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:38:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:38:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:38:22] Production.INFO: ==14539== Releasing lock...  
[2025-02-26 21:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:38:22] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 21:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:39:05
    [end_date_ymd] => 2025-02-26 21:39:05
    [RateCDR] => 1
)
  
[2025-02-26 21:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:39:05' and `end` < '2025-02-26 21:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:39:17] Production.INFO: count ==1675  
[2025-02-26 21:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:39:05 - End Time 2025-02-26 21:39:05  
[2025-02-26 21:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564576', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564576', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564576', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564576', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:39:17] Production.INFO: ProcessCDR(1,14564576,1,1,2)  
[2025-02-26 21:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564576', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564576', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:39:21] Production.INFO: ==14609== Releasing lock...  
[2025-02-26 21:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:39:21] Production.INFO: 40.5 MB  #Memory Used#   
[2025-02-26 21:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:40:06
    [end_date_ymd] => 2025-02-26 21:40:06
    [RateCDR] => 1
)
  
[2025-02-26 21:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:40:06' and `end` < '2025-02-26 21:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:40:18] Production.INFO: count ==1670  
[2025-02-26 21:40:19] Production.ERROR: pbx CDR StartTime 2025-02-26 18:40:06 - End Time 2025-02-26 21:40:06  
[2025-02-26 21:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564581', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564581', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564581', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564581', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:40:19] Production.INFO: ProcessCDR(1,14564581,1,1,2)  
[2025-02-26 21:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:40:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:40:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:40:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564581', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564581', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:40:24] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:40:24] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:40:24] Production.INFO: ==14682== Releasing lock...  
[2025-02-26 21:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:40:24] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:41:05
    [end_date_ymd] => 2025-02-26 21:41:05
    [RateCDR] => 1
)
  
[2025-02-26 21:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:41:05' and `end` < '2025-02-26 21:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:41:17] Production.INFO: count ==1636  
[2025-02-26 21:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:41:05 - End Time 2025-02-26 21:41:05  
[2025-02-26 21:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564587', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564587', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564587', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564587', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:41:18] Production.INFO: ProcessCDR(1,14564587,1,1,2)  
[2025-02-26 21:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564587', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564587', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:41:21] Production.INFO: ==14755== Releasing lock...  
[2025-02-26 21:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:41:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:42:06
    [end_date_ymd] => 2025-02-26 21:42:06
    [RateCDR] => 1
)
  
[2025-02-26 21:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:42:06' and `end` < '2025-02-26 21:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:42:18] Production.INFO: count ==1635  
[2025-02-26 21:42:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:42:06 - End Time 2025-02-26 21:42:06  
[2025-02-26 21:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564592', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564592', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564592', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564592', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:42:18] Production.INFO: ProcessCDR(1,14564592,1,1,2)  
[2025-02-26 21:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:42:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:42:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:42:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564592', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564592', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:42:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:42:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:42:23] Production.INFO: ==14825== Releasing lock...  
[2025-02-26 21:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:42:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:43:05
    [end_date_ymd] => 2025-02-26 21:43:05
    [RateCDR] => 1
)
  
[2025-02-26 21:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:43:05' and `end` < '2025-02-26 21:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:43:17] Production.INFO: count ==1638  
[2025-02-26 21:43:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:43:05 - End Time 2025-02-26 21:43:05  
[2025-02-26 21:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564597', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564597', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564597', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564597', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:43:18] Production.INFO: ProcessCDR(1,14564597,1,1,2)  
[2025-02-26 21:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564597', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564597', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:43:21] Production.INFO: ==14897== Releasing lock...  
[2025-02-26 21:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:43:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:44:06
    [end_date_ymd] => 2025-02-26 21:44:06
    [RateCDR] => 1
)
  
[2025-02-26 21:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:44:06' and `end` < '2025-02-26 21:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:44:18] Production.INFO: count ==1638  
[2025-02-26 21:44:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:44:06 - End Time 2025-02-26 21:44:06  
[2025-02-26 21:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564602', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564602', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:44:18] Production.INFO: ProcessCDR(1,14564602,1,1,2)  
[2025-02-26 21:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:44:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:44:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564602', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564602', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:44:23] Production.INFO: ==14974== Releasing lock...  
[2025-02-26 21:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:44:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:45:05
    [end_date_ymd] => 2025-02-26 21:45:05
    [RateCDR] => 1
)
  
[2025-02-26 21:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:45:05' and `end` < '2025-02-26 21:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:45:17] Production.INFO: count ==1636  
[2025-02-26 21:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:45:05 - End Time 2025-02-26 21:45:05  
[2025-02-26 21:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564607', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564607', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564607', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564607', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:45:17] Production.INFO: ProcessCDR(1,14564607,1,1,2)  
[2025-02-26 21:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564607', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564607', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:45:21] Production.INFO: ==15044== Releasing lock...  
[2025-02-26 21:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:45:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:46:06
    [end_date_ymd] => 2025-02-26 21:46:06
    [RateCDR] => 1
)
  
[2025-02-26 21:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:46:06' and `end` < '2025-02-26 21:46:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:46:18] Production.INFO: count ==1637  
[2025-02-26 21:46:19] Production.ERROR: pbx CDR StartTime 2025-02-26 18:46:06 - End Time 2025-02-26 21:46:06  
[2025-02-26 21:46:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564612', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564612', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564612', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564612', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:46:19] Production.INFO: ProcessCDR(1,14564612,1,1,2)  
[2025-02-26 21:46:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:46:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:46:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:46:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:46:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564612', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:46:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564612', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:46:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:46:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:46:23] Production.INFO: ==15115== Releasing lock...  
[2025-02-26 21:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:46:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:47:05
    [end_date_ymd] => 2025-02-26 21:47:05
    [RateCDR] => 1
)
  
[2025-02-26 21:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:47:05' and `end` < '2025-02-26 21:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:47:17] Production.INFO: count ==1632  
[2025-02-26 21:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:47:05 - End Time 2025-02-26 21:47:05  
[2025-02-26 21:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564617', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564617', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564617', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564617', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:47:17] Production.INFO: ProcessCDR(1,14564617,1,1,2)  
[2025-02-26 21:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564617', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564617', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:47:21] Production.INFO: ==15189== Releasing lock...  
[2025-02-26 21:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:47:21] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:48:05
    [end_date_ymd] => 2025-02-26 21:48:05
    [RateCDR] => 1
)
  
[2025-02-26 21:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:48:05' and `end` < '2025-02-26 21:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:48:17] Production.INFO: count ==1635  
[2025-02-26 21:48:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:48:05 - End Time 2025-02-26 21:48:05  
[2025-02-26 21:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564622', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564622', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564622', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564622', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:48:18] Production.INFO: ProcessCDR(1,14564622,1,1,2)  
[2025-02-26 21:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:48:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:48:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564622', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564622', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:48:22] Production.INFO: ==15262== Releasing lock...  
[2025-02-26 21:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:48:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:49:05
    [end_date_ymd] => 2025-02-26 21:49:05
    [RateCDR] => 1
)
  
[2025-02-26 21:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:49:05' and `end` < '2025-02-26 21:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:49:17] Production.INFO: count ==1636  
[2025-02-26 21:49:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:49:05 - End Time 2025-02-26 21:49:05  
[2025-02-26 21:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564627', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564627', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564627', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564627', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:49:18] Production.INFO: ProcessCDR(1,14564627,1,1,2)  
[2025-02-26 21:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564627', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564627', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:49:21] Production.INFO: ==15342== Releasing lock...  
[2025-02-26 21:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:49:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:50:06
    [end_date_ymd] => 2025-02-26 21:50:06
    [RateCDR] => 1
)
  
[2025-02-26 21:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:50:06' and `end` < '2025-02-26 21:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:50:18] Production.INFO: count ==1634  
[2025-02-26 21:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 18:50:06 - End Time 2025-02-26 21:50:06  
[2025-02-26 21:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564633', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564633', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564633', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564633', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:50:19] Production.INFO: ProcessCDR(1,14564633,1,1,2)  
[2025-02-26 21:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564633', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564633', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:50:22] Production.INFO: ==15421== Releasing lock...  
[2025-02-26 21:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:50:22] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:51:05
    [end_date_ymd] => 2025-02-26 21:51:05
    [RateCDR] => 1
)
  
[2025-02-26 21:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:51:05' and `end` < '2025-02-26 21:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:51:17] Production.INFO: count ==1620  
[2025-02-26 21:51:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:51:05 - End Time 2025-02-26 21:51:05  
[2025-02-26 21:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564638', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564638', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564638', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564638', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:51:17] Production.INFO: ProcessCDR(1,14564638,1,1,2)  
[2025-02-26 21:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564638', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564638', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:51:21] Production.INFO: ==15499== Releasing lock...  
[2025-02-26 21:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:51:21] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:52:06
    [end_date_ymd] => 2025-02-26 21:52:06
    [RateCDR] => 1
)
  
[2025-02-26 21:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:52:06' and `end` < '2025-02-26 21:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:52:18] Production.INFO: count ==1617  
[2025-02-26 21:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:52:06 - End Time 2025-02-26 21:52:06  
[2025-02-26 21:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564643', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564643', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564643', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564643', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:52:18] Production.INFO: ProcessCDR(1,14564643,1,1,2)  
[2025-02-26 21:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564643', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564643', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:52:22] Production.INFO: ==15577== Releasing lock...  
[2025-02-26 21:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:52:22] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:53:05
    [end_date_ymd] => 2025-02-26 21:53:05
    [RateCDR] => 1
)
  
[2025-02-26 21:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:53:05' and `end` < '2025-02-26 21:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:53:17] Production.INFO: count ==1615  
[2025-02-26 21:53:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:53:05 - End Time 2025-02-26 21:53:05  
[2025-02-26 21:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564648', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564648', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564648', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564648', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:53:18] Production.INFO: ProcessCDR(1,14564648,1,1,2)  
[2025-02-26 21:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564648', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564648', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:53:21] Production.INFO: ==15696== Releasing lock...  
[2025-02-26 21:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:53:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:54:05
    [end_date_ymd] => 2025-02-26 21:54:05
    [RateCDR] => 1
)
  
[2025-02-26 21:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:54:05' and `end` < '2025-02-26 21:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:54:17] Production.INFO: count ==1605  
[2025-02-26 21:54:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:54:05 - End Time 2025-02-26 21:54:05  
[2025-02-26 21:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564652', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564652', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564652', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564652', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:54:18] Production.INFO: ProcessCDR(1,14564652,1,1,2)  
[2025-02-26 21:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564652', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564652', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:54:21] Production.INFO: ==15774== Releasing lock...  
[2025-02-26 21:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:54:21] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:55:05
    [end_date_ymd] => 2025-02-26 21:55:05
    [RateCDR] => 1
)
  
[2025-02-26 21:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:55:05' and `end` < '2025-02-26 21:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:55:17] Production.INFO: count ==1600  
[2025-02-26 21:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:55:05 - End Time 2025-02-26 21:55:05  
[2025-02-26 21:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564658', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564658', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564658', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564658', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:55:17] Production.INFO: ProcessCDR(1,14564658,1,1,2)  
[2025-02-26 21:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564658', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564658', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:55:21] Production.INFO: ==15853== Releasing lock...  
[2025-02-26 21:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:55:21] Production.INFO: 39.75 MB  #Memory Used#   
[2025-02-26 21:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:56:06
    [end_date_ymd] => 2025-02-26 21:56:06
    [RateCDR] => 1
)
  
[2025-02-26 21:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:56:06' and `end` < '2025-02-26 21:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:56:18] Production.INFO: count ==1597  
[2025-02-26 21:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:56:06 - End Time 2025-02-26 21:56:06  
[2025-02-26 21:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564663', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564663', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564663', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564663', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:56:18] Production.INFO: ProcessCDR(1,14564663,1,1,2)  
[2025-02-26 21:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564663', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564663', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:56:21] Production.INFO: ==15930== Releasing lock...  
[2025-02-26 21:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:56:21] Production.INFO: 40 MB  #Memory Used#   
[2025-02-26 21:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:57:05
    [end_date_ymd] => 2025-02-26 21:57:05
    [RateCDR] => 1
)
  
[2025-02-26 21:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:57:05' and `end` < '2025-02-26 21:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:57:17] Production.INFO: count ==1592  
[2025-02-26 21:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 18:57:05 - End Time 2025-02-26 21:57:05  
[2025-02-26 21:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564668', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564668', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564668', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564668', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:57:18] Production.INFO: ProcessCDR(1,14564668,1,1,2)  
[2025-02-26 21:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564668', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564668', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:57:21] Production.INFO: ==16014== Releasing lock...  
[2025-02-26 21:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:57:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 21:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:58:06
    [end_date_ymd] => 2025-02-26 21:58:06
    [RateCDR] => 1
)
  
[2025-02-26 21:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:58:06' and `end` < '2025-02-26 21:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:58:18] Production.INFO: count ==1586  
[2025-02-26 21:58:19] Production.ERROR: pbx CDR StartTime 2025-02-26 18:58:06 - End Time 2025-02-26 21:58:06  
[2025-02-26 21:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564673', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564673', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564673', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564673', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:58:19] Production.INFO: ProcessCDR(1,14564673,1,1,2)  
[2025-02-26 21:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:58:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:58:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:58:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564673', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564673', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:58:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:58:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:58:23] Production.INFO: ==16092== Releasing lock...  
[2025-02-26 21:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:58:23] Production.INFO: 39.75 MB  #Memory Used#   
[2025-02-26 21:59:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 18:59:04
    [end_date_ymd] => 2025-02-26 21:59:04
    [RateCDR] => 1
)
  
[2025-02-26 21:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 18:59:04' and `end` < '2025-02-26 21:59:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 21:59:16] Production.INFO: count ==1591  
[2025-02-26 21:59:17] Production.ERROR: pbx CDR StartTime 2025-02-26 18:59:04 - End Time 2025-02-26 21:59:04  
[2025-02-26 21:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 21:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564678', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564678', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564678', 'tblTempVendorCDR_20' ) start  
[2025-02-26 21:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564678', 'tblTempVendorCDR_20' ) end  
[2025-02-26 21:59:17] Production.INFO: ProcessCDR(1,14564678,1,1,2)  
[2025-02-26 21:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 21:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 21:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564678', 'tblTempUsageDetail_20' ) start  
[2025-02-26 21:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564678', 'tblTempUsageDetail_20' ) end  
[2025-02-26 21:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 21:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 21:59:22] Production.INFO: ==16174== Releasing lock...  
[2025-02-26 21:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 21:59:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-02-26 22:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:00:06
    [end_date_ymd] => 2025-02-26 22:00:06
    [RateCDR] => 1
)
  
[2025-02-26 22:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:00:06' and `end` < '2025-02-26 22:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:00:18] Production.INFO: count ==1576  
[2025-02-26 22:00:19] Production.ERROR: pbx CDR StartTime 2025-02-26 19:00:06 - End Time 2025-02-26 22:00:06  
[2025-02-26 22:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564684', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564684', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564684', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564684', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:00:19] Production.INFO: ProcessCDR(1,14564684,1,1,2)  
[2025-02-26 22:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564684', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564684', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:00:22] Production.INFO: ==16259== Releasing lock...  
[2025-02-26 22:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:00:22] Production.INFO: 39.75 MB  #Memory Used#   
[2025-02-26 22:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:01:05
    [end_date_ymd] => 2025-02-26 22:01:05
    [RateCDR] => 1
)
  
[2025-02-26 22:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:01:05' and `end` < '2025-02-26 22:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:01:17] Production.INFO: count ==1557  
[2025-02-26 22:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:01:05 - End Time 2025-02-26 22:01:05  
[2025-02-26 22:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564689', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564689', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564689', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564689', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:01:17] Production.INFO: ProcessCDR(1,14564689,1,1,2)  
[2025-02-26 22:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564689', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564689', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:01:20] Production.INFO: ==16355== Releasing lock...  
[2025-02-26 22:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:01:20] Production.INFO: 39.75 MB  #Memory Used#   
[2025-02-26 22:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:02:05
    [end_date_ymd] => 2025-02-26 22:02:05
    [RateCDR] => 1
)
  
[2025-02-26 22:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:02:05' and `end` < '2025-02-26 22:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:02:17] Production.INFO: count ==1557  
[2025-02-26 22:02:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:02:05 - End Time 2025-02-26 22:02:05  
[2025-02-26 22:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564694', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564694', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564694', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564694', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:02:18] Production.INFO: ProcessCDR(1,14564694,1,1,2)  
[2025-02-26 22:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564694', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564694', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:02:21] Production.INFO: ==16441== Releasing lock...  
[2025-02-26 22:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:02:21] Production.INFO: 39.75 MB  #Memory Used#   
[2025-02-26 22:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:03:05
    [end_date_ymd] => 2025-02-26 22:03:05
    [RateCDR] => 1
)
  
[2025-02-26 22:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:03:05' and `end` < '2025-02-26 22:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:03:17] Production.INFO: count ==1549  
[2025-02-26 22:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:03:05 - End Time 2025-02-26 22:03:05  
[2025-02-26 22:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564699', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564699', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564699', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564699', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:03:17] Production.INFO: ProcessCDR(1,14564699,1,1,2)  
[2025-02-26 22:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564699', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564699', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:03:21] Production.INFO: ==16523== Releasing lock...  
[2025-02-26 22:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:03:21] Production.INFO: 39.5 MB  #Memory Used#   
[2025-02-26 22:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:04:05
    [end_date_ymd] => 2025-02-26 22:04:05
    [RateCDR] => 1
)
  
[2025-02-26 22:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:04:05' and `end` < '2025-02-26 22:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:04:17] Production.INFO: count ==1537  
[2025-02-26 22:04:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:04:05 - End Time 2025-02-26 22:04:05  
[2025-02-26 22:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564704', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564704', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564704', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564704', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:04:17] Production.INFO: ProcessCDR(1,14564704,1,1,2)  
[2025-02-26 22:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564704', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564704', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:04:21] Production.INFO: ==16607== Releasing lock...  
[2025-02-26 22:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:04:21] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:05:06
    [end_date_ymd] => 2025-02-26 22:05:06
    [RateCDR] => 1
)
  
[2025-02-26 22:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:05:06' and `end` < '2025-02-26 22:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:05:18] Production.INFO: count ==1538  
[2025-02-26 22:05:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:05:06 - End Time 2025-02-26 22:05:06  
[2025-02-26 22:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564709', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564709', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564709', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564709', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:05:18] Production.INFO: ProcessCDR(1,14564709,1,1,2)  
[2025-02-26 22:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:05:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:05:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:05:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564709', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564709', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:05:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:05:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:05:23] Production.INFO: ==16696== Releasing lock...  
[2025-02-26 22:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:05:23] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:06:05
    [end_date_ymd] => 2025-02-26 22:06:05
    [RateCDR] => 1
)
  
[2025-02-26 22:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:06:05' and `end` < '2025-02-26 22:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:06:17] Production.INFO: count ==1538  
[2025-02-26 22:06:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:06:05 - End Time 2025-02-26 22:06:05  
[2025-02-26 22:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564714', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564714', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564714', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564714', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:06:17] Production.INFO: ProcessCDR(1,14564714,1,1,2)  
[2025-02-26 22:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564714', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564714', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:06:22] Production.INFO: ==16773== Releasing lock...  
[2025-02-26 22:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:06:22] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:07:06
    [end_date_ymd] => 2025-02-26 22:07:06
    [RateCDR] => 1
)
  
[2025-02-26 22:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:07:06' and `end` < '2025-02-26 22:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:07:18] Production.INFO: count ==1526  
[2025-02-26 22:07:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:07:06 - End Time 2025-02-26 22:07:06  
[2025-02-26 22:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564719', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564719', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564719', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564719', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:07:18] Production.INFO: ProcessCDR(1,14564719,1,1,2)  
[2025-02-26 22:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564719', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564719', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:07:21] Production.INFO: ==16861== Releasing lock...  
[2025-02-26 22:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:07:21] Production.INFO: 39.5 MB  #Memory Used#   
[2025-02-26 22:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:08:05
    [end_date_ymd] => 2025-02-26 22:08:05
    [RateCDR] => 1
)
  
[2025-02-26 22:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:08:05' and `end` < '2025-02-26 22:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:08:17] Production.INFO: count ==1517  
[2025-02-26 22:08:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:08:05 - End Time 2025-02-26 22:08:05  
[2025-02-26 22:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564724', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564724', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564724', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564724', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:08:17] Production.INFO: ProcessCDR(1,14564724,1,1,2)  
[2025-02-26 22:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564724', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564724', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:08:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:08:20] Production.INFO: ==16987== Releasing lock...  
[2025-02-26 22:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:08:20] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:09:05
    [end_date_ymd] => 2025-02-26 22:09:05
    [RateCDR] => 1
)
  
[2025-02-26 22:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:09:05' and `end` < '2025-02-26 22:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:09:17] Production.INFO: count ==1510  
[2025-02-26 22:09:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:09:05 - End Time 2025-02-26 22:09:05  
[2025-02-26 22:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564729', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564729', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564729', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564729', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:09:18] Production.INFO: ProcessCDR(1,14564729,1,1,2)  
[2025-02-26 22:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564729', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564729', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:09:21] Production.INFO: ==17074== Releasing lock...  
[2025-02-26 22:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:09:21] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:10:06
    [end_date_ymd] => 2025-02-26 22:10:06
    [RateCDR] => 1
)
  
[2025-02-26 22:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:10:06' and `end` < '2025-02-26 22:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:10:18] Production.INFO: count ==1509  
[2025-02-26 22:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:10:06 - End Time 2025-02-26 22:10:06  
[2025-02-26 22:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564735', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564735', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564735', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564735', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:10:18] Production.INFO: ProcessCDR(1,14564735,1,1,2)  
[2025-02-26 22:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564735', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564735', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:10:21] Production.INFO: ==17163== Releasing lock...  
[2025-02-26 22:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:10:21] Production.INFO: 39.25 MB  #Memory Used#   
[2025-02-26 22:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:11:06
    [end_date_ymd] => 2025-02-26 22:11:06
    [RateCDR] => 1
)
  
[2025-02-26 22:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:11:06' and `end` < '2025-02-26 22:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:11:18] Production.INFO: count ==1461  
[2025-02-26 22:11:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:11:06 - End Time 2025-02-26 22:11:06  
[2025-02-26 22:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564740', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564740', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564740', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564740', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:11:18] Production.INFO: ProcessCDR(1,14564740,1,1,2)  
[2025-02-26 22:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564740', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564740', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:11:21] Production.INFO: ==17254== Releasing lock...  
[2025-02-26 22:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:11:21] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 22:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:12:05
    [end_date_ymd] => 2025-02-26 22:12:05
    [RateCDR] => 1
)
  
[2025-02-26 22:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:12:05' and `end` < '2025-02-26 22:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:12:17] Production.INFO: count ==1460  
[2025-02-26 22:12:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:12:05 - End Time 2025-02-26 22:12:05  
[2025-02-26 22:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564745', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564745', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564745', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564745', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:12:17] Production.INFO: ProcessCDR(1,14564745,1,1,2)  
[2025-02-26 22:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564745', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564745', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:12:20] Production.INFO: ==17338== Releasing lock...  
[2025-02-26 22:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:12:20] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 22:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:13:05
    [end_date_ymd] => 2025-02-26 22:13:05
    [RateCDR] => 1
)
  
[2025-02-26 22:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:13:05' and `end` < '2025-02-26 22:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:13:17] Production.INFO: count ==1459  
[2025-02-26 22:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:13:05 - End Time 2025-02-26 22:13:05  
[2025-02-26 22:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564750', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564750', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564750', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564750', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:13:17] Production.INFO: ProcessCDR(1,14564750,1,1,2)  
[2025-02-26 22:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564750', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564750', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:13:21] Production.INFO: ==17426== Releasing lock...  
[2025-02-26 22:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:13:21] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 22:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:14:06
    [end_date_ymd] => 2025-02-26 22:14:06
    [RateCDR] => 1
)
  
[2025-02-26 22:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:14:06' and `end` < '2025-02-26 22:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:14:18] Production.INFO: count ==1458  
[2025-02-26 22:14:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:14:06 - End Time 2025-02-26 22:14:06  
[2025-02-26 22:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564755', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564755', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564755', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564755', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:14:18] Production.INFO: ProcessCDR(1,14564755,1,1,2)  
[2025-02-26 22:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564755', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564755', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:14:21] Production.INFO: ==17521== Releasing lock...  
[2025-02-26 22:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:14:21] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 22:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:15:05
    [end_date_ymd] => 2025-02-26 22:15:05
    [RateCDR] => 1
)
  
[2025-02-26 22:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:15:05' and `end` < '2025-02-26 22:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:15:17] Production.INFO: count ==1456  
[2025-02-26 22:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:15:05 - End Time 2025-02-26 22:15:05  
[2025-02-26 22:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564760', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564760', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564760', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564760', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:15:18] Production.INFO: ProcessCDR(1,14564760,1,1,2)  
[2025-02-26 22:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564760', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564760', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:15:21] Production.INFO: ==17603== Releasing lock...  
[2025-02-26 22:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:15:21] Production.INFO: 39 MB  #Memory Used#   
[2025-02-26 22:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:16:06
    [end_date_ymd] => 2025-02-26 22:16:06
    [RateCDR] => 1
)
  
[2025-02-26 22:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:16:06' and `end` < '2025-02-26 22:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:16:18] Production.INFO: count ==1453  
[2025-02-26 22:16:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:16:06 - End Time 2025-02-26 22:16:06  
[2025-02-26 22:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564765', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564765', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564765', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564765', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:16:18] Production.INFO: ProcessCDR(1,14564765,1,1,2)  
[2025-02-26 22:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564765', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564765', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:16:21] Production.INFO: ==17690== Releasing lock...  
[2025-02-26 22:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:16:21] Production.INFO: 38.75 MB  #Memory Used#   
[2025-02-26 22:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:17:05
    [end_date_ymd] => 2025-02-26 22:17:05
    [RateCDR] => 1
)
  
[2025-02-26 22:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:17:05' and `end` < '2025-02-26 22:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:17:17] Production.INFO: count ==1448  
[2025-02-26 22:17:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:17:05 - End Time 2025-02-26 22:17:05  
[2025-02-26 22:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564770', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564770', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564770', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564770', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:17:18] Production.INFO: ProcessCDR(1,14564770,1,1,2)  
[2025-02-26 22:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:17:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564770', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564770', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:17:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:17:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:17:22] Production.INFO: ==17800== Releasing lock...  
[2025-02-26 22:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:17:22] Production.INFO: 38.75 MB  #Memory Used#   
[2025-02-26 22:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:18:05
    [end_date_ymd] => 2025-02-26 22:18:05
    [RateCDR] => 1
)
  
[2025-02-26 22:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:18:05' and `end` < '2025-02-26 22:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:18:17] Production.INFO: count ==1437  
[2025-02-26 22:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:18:05 - End Time 2025-02-26 22:18:05  
[2025-02-26 22:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564775', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564775', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564775', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564775', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:18:17] Production.INFO: ProcessCDR(1,14564775,1,1,2)  
[2025-02-26 22:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564775', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564775', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:18:21] Production.INFO: ==17881== Releasing lock...  
[2025-02-26 22:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:18:21] Production.INFO: 38.75 MB  #Memory Used#   
[2025-02-26 22:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:19:06
    [end_date_ymd] => 2025-02-26 22:19:06
    [RateCDR] => 1
)
  
[2025-02-26 22:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:19:06' and `end` < '2025-02-26 22:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:19:18] Production.INFO: count ==1427  
[2025-02-26 22:19:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:19:06 - End Time 2025-02-26 22:19:06  
[2025-02-26 22:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564780', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564780', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564780', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564780', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:19:18] Production.INFO: ProcessCDR(1,14564780,1,1,2)  
[2025-02-26 22:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564780', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564780', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:19:21] Production.INFO: ==17965== Releasing lock...  
[2025-02-26 22:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:19:21] Production.INFO: 38.75 MB  #Memory Used#   
[2025-02-26 22:20:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:20:05
    [end_date_ymd] => 2025-02-26 22:20:05
    [RateCDR] => 1
)
  
[2025-02-26 22:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:20:05' and `end` < '2025-02-26 22:20:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:20:17] Production.INFO: count ==1411  
[2025-02-26 22:20:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:20:05 - End Time 2025-02-26 22:20:05  
[2025-02-26 22:20:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:20:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564785', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564785', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564785', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564785', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:20:18] Production.INFO: ProcessCDR(1,14564785,1,1,2)  
[2025-02-26 22:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564785', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564785', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:20:21] Production.INFO: ==18050== Releasing lock...  
[2025-02-26 22:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:20:21] Production.INFO: 38.5 MB  #Memory Used#   
[2025-02-26 22:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:21:05
    [end_date_ymd] => 2025-02-26 22:21:05
    [RateCDR] => 1
)
  
[2025-02-26 22:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:21:05' and `end` < '2025-02-26 22:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:21:17] Production.INFO: count ==1313  
[2025-02-26 22:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:21:05 - End Time 2025-02-26 22:21:05  
[2025-02-26 22:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564791', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564791', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564791', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564791', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:21:17] Production.INFO: ProcessCDR(1,14564791,1,1,2)  
[2025-02-26 22:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564791', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564791', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:21:20] Production.INFO: ==18139== Releasing lock...  
[2025-02-26 22:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:21:20] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:22:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:22:04
    [end_date_ymd] => 2025-02-26 22:22:04
    [RateCDR] => 1
)
  
[2025-02-26 22:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:22:04' and `end` < '2025-02-26 22:22:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:22:17] Production.INFO: count ==1309  
[2025-02-26 22:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:22:04 - End Time 2025-02-26 22:22:04  
[2025-02-26 22:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564796', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564796', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564796', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564796', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:22:17] Production.INFO: ProcessCDR(1,14564796,1,1,2)  
[2025-02-26 22:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564796', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564796', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:22:20] Production.INFO: ==18218== Releasing lock...  
[2025-02-26 22:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:22:20] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:23:05
    [end_date_ymd] => 2025-02-26 22:23:05
    [RateCDR] => 1
)
  
[2025-02-26 22:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:23:05' and `end` < '2025-02-26 22:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:23:17] Production.INFO: count ==1304  
[2025-02-26 22:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:23:05 - End Time 2025-02-26 22:23:05  
[2025-02-26 22:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564801', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564801', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564801', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564801', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:23:17] Production.INFO: ProcessCDR(1,14564801,1,1,2)  
[2025-02-26 22:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:23:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564801', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564801', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:23:22] Production.INFO: ==18304== Releasing lock...  
[2025-02-26 22:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:23:22] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 22:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:24:06
    [end_date_ymd] => 2025-02-26 22:24:06
    [RateCDR] => 1
)
  
[2025-02-26 22:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:24:06' and `end` < '2025-02-26 22:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:24:18] Production.INFO: count ==1302  
[2025-02-26 22:24:19] Production.ERROR: pbx CDR StartTime 2025-02-26 19:24:06 - End Time 2025-02-26 22:24:06  
[2025-02-26 22:24:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564806', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564806', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564806', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564806', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:24:19] Production.INFO: ProcessCDR(1,14564806,1,1,2)  
[2025-02-26 22:24:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:24:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:24:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564806', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564806', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:24:22] Production.INFO: ==18422== Releasing lock...  
[2025-02-26 22:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:24:22] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 22:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:25:05
    [end_date_ymd] => 2025-02-26 22:25:05
    [RateCDR] => 1
)
  
[2025-02-26 22:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:25:05' and `end` < '2025-02-26 22:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:25:17] Production.INFO: count ==1301  
[2025-02-26 22:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:25:05 - End Time 2025-02-26 22:25:05  
[2025-02-26 22:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564811', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564811', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564811', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564811', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:25:18] Production.INFO: ProcessCDR(1,14564811,1,1,2)  
[2025-02-26 22:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564811', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564811', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:25:21] Production.INFO: ==18497== Releasing lock...  
[2025-02-26 22:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:25:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:26:06
    [end_date_ymd] => 2025-02-26 22:26:06
    [RateCDR] => 1
)
  
[2025-02-26 22:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:26:06' and `end` < '2025-02-26 22:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:26:18] Production.INFO: count ==1300  
[2025-02-26 22:26:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:26:06 - End Time 2025-02-26 22:26:06  
[2025-02-26 22:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564816', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564816', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564816', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564816', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:26:18] Production.INFO: ProcessCDR(1,14564816,1,1,2)  
[2025-02-26 22:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564816', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564816', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:26:21] Production.INFO: ==18580== Releasing lock...  
[2025-02-26 22:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:26:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:27:05
    [end_date_ymd] => 2025-02-26 22:27:05
    [RateCDR] => 1
)
  
[2025-02-26 22:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:27:05' and `end` < '2025-02-26 22:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:27:17] Production.INFO: count ==1300  
[2025-02-26 22:27:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:27:05 - End Time 2025-02-26 22:27:05  
[2025-02-26 22:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564821', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564821', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564821', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564821', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:27:18] Production.INFO: ProcessCDR(1,14564821,1,1,2)  
[2025-02-26 22:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564821', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564821', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:27:21] Production.INFO: ==18661== Releasing lock...  
[2025-02-26 22:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:27:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:28:05
    [end_date_ymd] => 2025-02-26 22:28:05
    [RateCDR] => 1
)
  
[2025-02-26 22:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:28:05' and `end` < '2025-02-26 22:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:28:17] Production.INFO: count ==1302  
[2025-02-26 22:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:28:05 - End Time 2025-02-26 22:28:05  
[2025-02-26 22:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564826', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564826', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564826', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564826', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:28:18] Production.INFO: ProcessCDR(1,14564826,1,1,2)  
[2025-02-26 22:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564826', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564826', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:28:22] Production.INFO: ==18741== Releasing lock...  
[2025-02-26 22:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:28:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:29:05
    [end_date_ymd] => 2025-02-26 22:29:05
    [RateCDR] => 1
)
  
[2025-02-26 22:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:29:05' and `end` < '2025-02-26 22:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:29:17] Production.INFO: count ==1302  
[2025-02-26 22:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:29:05 - End Time 2025-02-26 22:29:05  
[2025-02-26 22:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564831', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564831', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564831', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564831', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:29:17] Production.INFO: ProcessCDR(1,14564831,1,1,2)  
[2025-02-26 22:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564831', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564831', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:29:21] Production.INFO: ==18819== Releasing lock...  
[2025-02-26 22:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:29:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:30:06
    [end_date_ymd] => 2025-02-26 22:30:06
    [RateCDR] => 1
)
  
[2025-02-26 22:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:30:06' and `end` < '2025-02-26 22:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:30:18] Production.INFO: count ==1296  
[2025-02-26 22:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:30:06 - End Time 2025-02-26 22:30:06  
[2025-02-26 22:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564837', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564837', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564837', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564837', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:30:18] Production.INFO: ProcessCDR(1,14564837,1,1,2)  
[2025-02-26 22:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564837', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564837', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:30:21] Production.INFO: ==18901== Releasing lock...  
[2025-02-26 22:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:30:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:31:05
    [end_date_ymd] => 2025-02-26 22:31:05
    [RateCDR] => 1
)
  
[2025-02-26 22:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:31:05' and `end` < '2025-02-26 22:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:31:17] Production.INFO: count ==1255  
[2025-02-26 22:31:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:31:05 - End Time 2025-02-26 22:31:05  
[2025-02-26 22:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564842', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564842', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564842', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564842', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:31:17] Production.INFO: ProcessCDR(1,14564842,1,1,2)  
[2025-02-26 22:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564842', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564842', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:31:20] Production.INFO: ==18978== Releasing lock...  
[2025-02-26 22:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:31:20] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:32:05
    [end_date_ymd] => 2025-02-26 22:32:05
    [RateCDR] => 1
)
  
[2025-02-26 22:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:32:05' and `end` < '2025-02-26 22:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:32:17] Production.INFO: count ==1245  
[2025-02-26 22:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:32:05 - End Time 2025-02-26 22:32:05  
[2025-02-26 22:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564847', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564847', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564847', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564847', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:32:18] Production.INFO: ProcessCDR(1,14564847,1,1,2)  
[2025-02-26 22:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:32:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:32:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:32:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564847', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564847', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:32:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:32:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:32:23] Production.INFO: ==19057== Releasing lock...  
[2025-02-26 22:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:32:23] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:33:05
    [end_date_ymd] => 2025-02-26 22:33:05
    [RateCDR] => 1
)
  
[2025-02-26 22:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:33:05' and `end` < '2025-02-26 22:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:33:17] Production.INFO: count ==1244  
[2025-02-26 22:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:33:05 - End Time 2025-02-26 22:33:05  
[2025-02-26 22:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564852', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564852', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564852', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564852', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:33:17] Production.INFO: ProcessCDR(1,14564852,1,1,2)  
[2025-02-26 22:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564852', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564852', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:33:20] Production.INFO: ==19142== Releasing lock...  
[2025-02-26 22:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:33:20] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:34:05
    [end_date_ymd] => 2025-02-26 22:34:05
    [RateCDR] => 1
)
  
[2025-02-26 22:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:34:05' and `end` < '2025-02-26 22:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:34:17] Production.INFO: count ==1239  
[2025-02-26 22:34:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:34:05 - End Time 2025-02-26 22:34:05  
[2025-02-26 22:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564857', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564857', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564857', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564857', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:34:18] Production.INFO: ProcessCDR(1,14564857,1,1,2)  
[2025-02-26 22:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564857', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564857', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:34:21] Production.INFO: ==19224== Releasing lock...  
[2025-02-26 22:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:34:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:35:05
    [end_date_ymd] => 2025-02-26 22:35:05
    [RateCDR] => 1
)
  
[2025-02-26 22:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:35:05' and `end` < '2025-02-26 22:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:35:17] Production.INFO: count ==1238  
[2025-02-26 22:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:35:05 - End Time 2025-02-26 22:35:05  
[2025-02-26 22:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564862', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564862', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564862', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564862', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:35:17] Production.INFO: ProcessCDR(1,14564862,1,1,2)  
[2025-02-26 22:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564862', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564862', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:35:21] Production.INFO: ==19299== Releasing lock...  
[2025-02-26 22:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:35:21] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 22:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:36:05
    [end_date_ymd] => 2025-02-26 22:36:05
    [RateCDR] => 1
)
  
[2025-02-26 22:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:36:05' and `end` < '2025-02-26 22:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:36:17] Production.INFO: count ==1238  
[2025-02-26 22:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:36:05 - End Time 2025-02-26 22:36:05  
[2025-02-26 22:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564867', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564867', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564867', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564867', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:36:18] Production.INFO: ProcessCDR(1,14564867,1,1,2)  
[2025-02-26 22:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564867', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564867', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:36:21] Production.INFO: ==19380== Releasing lock...  
[2025-02-26 22:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:36:21] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 22:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:37:06
    [end_date_ymd] => 2025-02-26 22:37:06
    [RateCDR] => 1
)
  
[2025-02-26 22:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:37:06' and `end` < '2025-02-26 22:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:37:18] Production.INFO: count ==1236  
[2025-02-26 22:37:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:37:06 - End Time 2025-02-26 22:37:06  
[2025-02-26 22:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564872', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564872', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564872', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564872', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:37:18] Production.INFO: ProcessCDR(1,14564872,1,1,2)  
[2025-02-26 22:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564872', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564872', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:37:21] Production.INFO: ==19459== Releasing lock...  
[2025-02-26 22:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:37:21] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 22:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:38:05
    [end_date_ymd] => 2025-02-26 22:38:05
    [RateCDR] => 1
)
  
[2025-02-26 22:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:38:05' and `end` < '2025-02-26 22:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:38:17] Production.INFO: count ==1233  
[2025-02-26 22:38:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:38:05 - End Time 2025-02-26 22:38:05  
[2025-02-26 22:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564877', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564877', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564877', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564877', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:38:18] Production.INFO: ProcessCDR(1,14564877,1,1,2)  
[2025-02-26 22:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564877', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564877', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:38:21] Production.INFO: ==19539== Releasing lock...  
[2025-02-26 22:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:38:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:39:06
    [end_date_ymd] => 2025-02-26 22:39:06
    [RateCDR] => 1
)
  
[2025-02-26 22:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:39:06' and `end` < '2025-02-26 22:39:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:39:18] Production.INFO: count ==1228  
[2025-02-26 22:39:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:39:06 - End Time 2025-02-26 22:39:06  
[2025-02-26 22:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564882', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564882', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564882', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564882', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:39:18] Production.INFO: ProcessCDR(1,14564882,1,1,2)  
[2025-02-26 22:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564882', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564882', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:39:21] Production.INFO: ==19653== Releasing lock...  
[2025-02-26 22:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:39:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:40:06
    [end_date_ymd] => 2025-02-26 22:40:06
    [RateCDR] => 1
)
  
[2025-02-26 22:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:40:06' and `end` < '2025-02-26 22:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:40:18] Production.INFO: count ==1226  
[2025-02-26 22:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:40:06 - End Time 2025-02-26 22:40:06  
[2025-02-26 22:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564887', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564887', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564887', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564887', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:40:18] Production.INFO: ProcessCDR(1,14564887,1,1,2)  
[2025-02-26 22:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564887', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564887', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:40:21] Production.INFO: ==19726== Releasing lock...  
[2025-02-26 22:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:40:21] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 22:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:41:05
    [end_date_ymd] => 2025-02-26 22:41:05
    [RateCDR] => 1
)
  
[2025-02-26 22:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:41:05' and `end` < '2025-02-26 22:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:41:17] Production.INFO: count ==1189  
[2025-02-26 22:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:41:05 - End Time 2025-02-26 22:41:05  
[2025-02-26 22:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564893', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564893', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564893', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564893', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:41:18] Production.INFO: ProcessCDR(1,14564893,1,1,2)  
[2025-02-26 22:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564893', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564893', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:41:21] Production.INFO: ==19805== Releasing lock...  
[2025-02-26 22:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:41:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 22:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:42:05
    [end_date_ymd] => 2025-02-26 22:42:05
    [RateCDR] => 1
)
  
[2025-02-26 22:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:42:05' and `end` < '2025-02-26 22:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:42:17] Production.INFO: count ==1193  
[2025-02-26 22:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:42:05 - End Time 2025-02-26 22:42:05  
[2025-02-26 22:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564898', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564898', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564898', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564898', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:42:17] Production.INFO: ProcessCDR(1,14564898,1,1,2)  
[2025-02-26 22:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564898', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564898', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:42:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:42:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:42:20] Production.INFO: ==19879== Releasing lock...  
[2025-02-26 22:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:42:20] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 22:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:43:05
    [end_date_ymd] => 2025-02-26 22:43:05
    [RateCDR] => 1
)
  
[2025-02-26 22:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:43:05' and `end` < '2025-02-26 22:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:43:17] Production.INFO: count ==1197  
[2025-02-26 22:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:43:05 - End Time 2025-02-26 22:43:05  
[2025-02-26 22:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564903', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564903', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564903', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564903', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:43:17] Production.INFO: ProcessCDR(1,14564903,1,1,2)  
[2025-02-26 22:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564903', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564903', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:43:21] Production.INFO: ==19953== Releasing lock...  
[2025-02-26 22:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:43:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:44:05
    [end_date_ymd] => 2025-02-26 22:44:05
    [RateCDR] => 1
)
  
[2025-02-26 22:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:44:05' and `end` < '2025-02-26 22:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:44:17] Production.INFO: count ==1206  
[2025-02-26 22:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:44:05 - End Time 2025-02-26 22:44:05  
[2025-02-26 22:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564908', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564908', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564908', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564908', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:44:17] Production.INFO: ProcessCDR(1,14564908,1,1,2)  
[2025-02-26 22:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564908', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564908', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:44:21] Production.INFO: ==20028== Releasing lock...  
[2025-02-26 22:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:44:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:45:05
    [end_date_ymd] => 2025-02-26 22:45:05
    [RateCDR] => 1
)
  
[2025-02-26 22:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:45:05' and `end` < '2025-02-26 22:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:45:17] Production.INFO: count ==1219  
[2025-02-26 22:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:45:05 - End Time 2025-02-26 22:45:05  
[2025-02-26 22:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564913', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564913', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564913', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564913', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:45:17] Production.INFO: ProcessCDR(1,14564913,1,1,2)  
[2025-02-26 22:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:45:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564913', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564913', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:45:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:45:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:45:20] Production.INFO: ==20103== Releasing lock...  
[2025-02-26 22:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:45:20] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:46:05
    [end_date_ymd] => 2025-02-26 22:46:05
    [RateCDR] => 1
)
  
[2025-02-26 22:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:46:05' and `end` < '2025-02-26 22:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:46:17] Production.INFO: count ==1232  
[2025-02-26 22:46:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:46:05 - End Time 2025-02-26 22:46:05  
[2025-02-26 22:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564918', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564918', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564918', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564918', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:46:17] Production.INFO: ProcessCDR(1,14564918,1,1,2)  
[2025-02-26 22:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564918', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564918', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:46:21] Production.INFO: ==20178== Releasing lock...  
[2025-02-26 22:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:46:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:47:06
    [end_date_ymd] => 2025-02-26 22:47:06
    [RateCDR] => 1
)
  
[2025-02-26 22:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:47:06' and `end` < '2025-02-26 22:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:47:18] Production.INFO: count ==1230  
[2025-02-26 22:47:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:47:06 - End Time 2025-02-26 22:47:06  
[2025-02-26 22:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564923', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564923', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564923', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564923', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:47:18] Production.INFO: ProcessCDR(1,14564923,1,1,2)  
[2025-02-26 22:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564923', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564923', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:47:21] Production.INFO: ==20257== Releasing lock...  
[2025-02-26 22:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:47:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:48:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:48:04
    [end_date_ymd] => 2025-02-26 22:48:04
    [RateCDR] => 1
)
  
[2025-02-26 22:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:48:04' and `end` < '2025-02-26 22:48:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:48:16] Production.INFO: count ==1225  
[2025-02-26 22:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:48:04 - End Time 2025-02-26 22:48:04  
[2025-02-26 22:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564924', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564924', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564924', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564924', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:48:17] Production.INFO: ProcessCDR(1,14564924,1,1,2)  
[2025-02-26 22:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564924', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564924', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:48:20] Production.INFO: ==20332== Releasing lock...  
[2025-02-26 22:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:48:20] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 22:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:49:05
    [end_date_ymd] => 2025-02-26 22:49:05
    [RateCDR] => 1
)
  
[2025-02-26 22:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:49:05' and `end` < '2025-02-26 22:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:49:17] Production.INFO: count ==1229  
[2025-02-26 22:49:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:49:05 - End Time 2025-02-26 22:49:05  
[2025-02-26 22:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564933', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564933', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564933', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564933', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:49:17] Production.INFO: ProcessCDR(1,14564933,1,1,2)  
[2025-02-26 22:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:49:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:49:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564933', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564933', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:49:22] Production.INFO: ==20410== Releasing lock...  
[2025-02-26 22:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:49:22] Production.INFO: 38 MB  #Memory Used#   
[2025-02-26 22:50:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:50:07
    [end_date_ymd] => 2025-02-26 22:50:07
    [RateCDR] => 1
)
  
[2025-02-26 22:50:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:50:07' and `end` < '2025-02-26 22:50:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:50:19] Production.INFO: count ==1227  
[2025-02-26 22:50:19] Production.ERROR: pbx CDR StartTime 2025-02-26 19:50:07 - End Time 2025-02-26 22:50:07  
[2025-02-26 22:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564939', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564939', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564939', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564939', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:50:19] Production.INFO: ProcessCDR(1,14564939,1,1,2)  
[2025-02-26 22:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564939', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564939', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:50:22] Production.INFO: ==20487== Releasing lock...  
[2025-02-26 22:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:50:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 22:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:51:05
    [end_date_ymd] => 2025-02-26 22:51:05
    [RateCDR] => 1
)
  
[2025-02-26 22:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:51:05' and `end` < '2025-02-26 22:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:51:17] Production.INFO: count ==1199  
[2025-02-26 22:51:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:51:05 - End Time 2025-02-26 22:51:05  
[2025-02-26 22:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564944', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564944', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564944', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564944', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:51:17] Production.INFO: ProcessCDR(1,14564944,1,1,2)  
[2025-02-26 22:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564944', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564944', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:51:21] Production.INFO: ==20563== Releasing lock...  
[2025-02-26 22:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:51:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:52:06
    [end_date_ymd] => 2025-02-26 22:52:06
    [RateCDR] => 1
)
  
[2025-02-26 22:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:52:06' and `end` < '2025-02-26 22:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:52:18] Production.INFO: count ==1200  
[2025-02-26 22:52:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:52:06 - End Time 2025-02-26 22:52:06  
[2025-02-26 22:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564949', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564949', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564949', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564949', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:52:18] Production.INFO: ProcessCDR(1,14564949,1,1,2)  
[2025-02-26 22:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:52:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564949', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:52:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564949', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:52:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:52:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:52:23] Production.INFO: ==20634== Releasing lock...  
[2025-02-26 22:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:52:23] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:53:05
    [end_date_ymd] => 2025-02-26 22:53:05
    [RateCDR] => 1
)
  
[2025-02-26 22:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:53:05' and `end` < '2025-02-26 22:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:53:17] Production.INFO: count ==1202  
[2025-02-26 22:53:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:53:05 - End Time 2025-02-26 22:53:05  
[2025-02-26 22:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564954', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564954', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564954', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564954', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:53:17] Production.INFO: ProcessCDR(1,14564954,1,1,2)  
[2025-02-26 22:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564954', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564954', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:53:21] Production.INFO: ==20707== Releasing lock...  
[2025-02-26 22:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:53:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:54:06
    [end_date_ymd] => 2025-02-26 22:54:06
    [RateCDR] => 1
)
  
[2025-02-26 22:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:54:06' and `end` < '2025-02-26 22:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:54:18] Production.INFO: count ==1197  
[2025-02-26 22:54:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:54:06 - End Time 2025-02-26 22:54:06  
[2025-02-26 22:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564959', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564959', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564959', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564959', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:54:18] Production.INFO: ProcessCDR(1,14564959,1,1,2)  
[2025-02-26 22:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564959', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564959', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:54:21] Production.INFO: ==20782== Releasing lock...  
[2025-02-26 22:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:54:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:55:05
    [end_date_ymd] => 2025-02-26 22:55:05
    [RateCDR] => 1
)
  
[2025-02-26 22:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:55:05' and `end` < '2025-02-26 22:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:55:17] Production.INFO: count ==1189  
[2025-02-26 22:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:55:05 - End Time 2025-02-26 22:55:05  
[2025-02-26 22:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564964', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564964', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564964', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564964', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:55:17] Production.INFO: ProcessCDR(1,14564964,1,1,2)  
[2025-02-26 22:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564964', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564964', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:55:20] Production.INFO: ==20898== Releasing lock...  
[2025-02-26 22:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:55:20] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 22:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:56:06
    [end_date_ymd] => 2025-02-26 22:56:06
    [RateCDR] => 1
)
  
[2025-02-26 22:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:56:06' and `end` < '2025-02-26 22:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:56:18] Production.INFO: count ==1181  
[2025-02-26 22:56:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:56:06 - End Time 2025-02-26 22:56:06  
[2025-02-26 22:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564969', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564969', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564969', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564969', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:56:18] Production.INFO: ProcessCDR(1,14564969,1,1,2)  
[2025-02-26 22:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:56:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564969', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564969', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:56:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:56:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:56:22] Production.INFO: ==20971== Releasing lock...  
[2025-02-26 22:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:56:22] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:57:05
    [end_date_ymd] => 2025-02-26 22:57:05
    [RateCDR] => 1
)
  
[2025-02-26 22:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:57:05' and `end` < '2025-02-26 22:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:57:17] Production.INFO: count ==1181  
[2025-02-26 22:57:17] Production.ERROR: pbx CDR StartTime 2025-02-26 19:57:05 - End Time 2025-02-26 22:57:05  
[2025-02-26 22:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564974', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564974', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564974', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564974', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:57:17] Production.INFO: ProcessCDR(1,14564974,1,1,2)  
[2025-02-26 22:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564974', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564974', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:57:20] Production.INFO: ==21043== Releasing lock...  
[2025-02-26 22:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:57:20] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:58:06
    [end_date_ymd] => 2025-02-26 22:58:06
    [RateCDR] => 1
)
  
[2025-02-26 22:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:58:06' and `end` < '2025-02-26 22:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:58:18] Production.INFO: count ==1181  
[2025-02-26 22:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:58:06 - End Time 2025-02-26 22:58:06  
[2025-02-26 22:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564979', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564979', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564979', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564979', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:58:18] Production.INFO: ProcessCDR(1,14564979,1,1,2)  
[2025-02-26 22:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564979', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564979', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:58:21] Production.INFO: ==21116== Releasing lock...  
[2025-02-26 22:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:58:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 22:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 19:59:05
    [end_date_ymd] => 2025-02-26 22:59:05
    [RateCDR] => 1
)
  
[2025-02-26 22:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 19:59:05' and `end` < '2025-02-26 22:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 22:59:17] Production.INFO: count ==1184  
[2025-02-26 22:59:18] Production.ERROR: pbx CDR StartTime 2025-02-26 19:59:05 - End Time 2025-02-26 22:59:05  
[2025-02-26 22:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564984', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564984', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564984', 'tblTempVendorCDR_20' ) start  
[2025-02-26 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564984', 'tblTempVendorCDR_20' ) end  
[2025-02-26 22:59:18] Production.INFO: ProcessCDR(1,14564984,1,1,2)  
[2025-02-26 22:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 22:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 22:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564984', 'tblTempUsageDetail_20' ) start  
[2025-02-26 22:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564984', 'tblTempUsageDetail_20' ) end  
[2025-02-26 22:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 22:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 22:59:21] Production.INFO: ==21187== Releasing lock...  
[2025-02-26 22:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 22:59:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:00:06
    [end_date_ymd] => 2025-02-26 23:00:06
    [RateCDR] => 1
)
  
[2025-02-26 23:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:00:06' and `end` < '2025-02-26 23:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:00:18] Production.INFO: count ==1184  
[2025-02-26 23:00:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:00:06 - End Time 2025-02-26 23:00:06  
[2025-02-26 23:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564990', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564990', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564990', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564990', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:00:19] Production.INFO: ProcessCDR(1,14564990,1,1,2)  
[2025-02-26 23:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564990', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564990', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:00:22] Production.INFO: ==21266== Releasing lock...  
[2025-02-26 23:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:00:22] Production.INFO: 37.5 MB  #Memory Used#   
[2025-02-26 23:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:01:05
    [end_date_ymd] => 2025-02-26 23:01:05
    [RateCDR] => 1
)
  
[2025-02-26 23:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:01:05' and `end` < '2025-02-26 23:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:01:17] Production.INFO: count ==1178  
[2025-02-26 23:01:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:01:05 - End Time 2025-02-26 23:01:05  
[2025-02-26 23:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564995', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14564995', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564995', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14564995', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:01:17] Production.INFO: ProcessCDR(1,14564995,1,1,2)  
[2025-02-26 23:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14564995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14564995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14564995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14564995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564995', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14564995', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:01:22] Production.INFO: ==21352== Releasing lock...  
[2025-02-26 23:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:01:22] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:02:05
    [end_date_ymd] => 2025-02-26 23:02:05
    [RateCDR] => 1
)
  
[2025-02-26 23:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:02:05' and `end` < '2025-02-26 23:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:02:17] Production.INFO: count ==1175  
[2025-02-26 23:02:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:02:05 - End Time 2025-02-26 23:02:05  
[2025-02-26 23:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565000', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565000', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565000', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565000', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:02:17] Production.INFO: ProcessCDR(1,14565000,1,1,2)  
[2025-02-26 23:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565000', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565000', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:02:21] Production.INFO: ==21503== Releasing lock...  
[2025-02-26 23:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:02:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:03:05
    [end_date_ymd] => 2025-02-26 23:03:05
    [RateCDR] => 1
)
  
[2025-02-26 23:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:03:05' and `end` < '2025-02-26 23:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:03:17] Production.INFO: count ==1176  
[2025-02-26 23:03:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:03:05 - End Time 2025-02-26 23:03:05  
[2025-02-26 23:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565005', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565005', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565005', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565005', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:03:17] Production.INFO: ProcessCDR(1,14565005,1,1,2)  
[2025-02-26 23:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565005', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565005', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:03:20] Production.INFO: ==21574== Releasing lock...  
[2025-02-26 23:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:03:20] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:04:05
    [end_date_ymd] => 2025-02-26 23:04:05
    [RateCDR] => 1
)
  
[2025-02-26 23:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:04:05' and `end` < '2025-02-26 23:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:04:17] Production.INFO: count ==1177  
[2025-02-26 23:04:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:04:05 - End Time 2025-02-26 23:04:05  
[2025-02-26 23:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565010', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565010', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565010', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565010', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:04:18] Production.INFO: ProcessCDR(1,14565010,1,1,2)  
[2025-02-26 23:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:04:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:04:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565010', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565010', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:04:22] Production.INFO: ==21646== Releasing lock...  
[2025-02-26 23:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:04:22] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:05:04
    [end_date_ymd] => 2025-02-26 23:05:04
    [RateCDR] => 1
)
  
[2025-02-26 23:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:05:04' and `end` < '2025-02-26 23:05:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:05:17] Production.INFO: count ==1176  
[2025-02-26 23:05:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:05:04 - End Time 2025-02-26 23:05:04  
[2025-02-26 23:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565015', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565015', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565015', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565015', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:05:17] Production.INFO: ProcessCDR(1,14565015,1,1,2)  
[2025-02-26 23:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565015', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565015', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:05:21] Production.INFO: ==21795== Releasing lock...  
[2025-02-26 23:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:05:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:06:06
    [end_date_ymd] => 2025-02-26 23:06:06
    [RateCDR] => 1
)
  
[2025-02-26 23:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:06:06' and `end` < '2025-02-26 23:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:06:18] Production.INFO: count ==1176  
[2025-02-26 23:06:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:06:06 - End Time 2025-02-26 23:06:06  
[2025-02-26 23:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565020', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565020', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565020', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565020', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:06:18] Production.INFO: ProcessCDR(1,14565020,1,1,2)  
[2025-02-26 23:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565020', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565020', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:06:22] Production.INFO: ==21869== Releasing lock...  
[2025-02-26 23:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:06:22] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:07:05
    [end_date_ymd] => 2025-02-26 23:07:05
    [RateCDR] => 1
)
  
[2025-02-26 23:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:07:05' and `end` < '2025-02-26 23:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:07:17] Production.INFO: count ==1171  
[2025-02-26 23:07:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:07:05 - End Time 2025-02-26 23:07:05  
[2025-02-26 23:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565025', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565025', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565025', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565025', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:07:17] Production.INFO: ProcessCDR(1,14565025,1,1,2)  
[2025-02-26 23:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:07:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:07:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:07:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565025', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:07:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565025', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:07:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:07:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:07:21] Production.INFO: ==21941== Releasing lock...  
[2025-02-26 23:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:07:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-02-26 23:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:08:06
    [end_date_ymd] => 2025-02-26 23:08:06
    [RateCDR] => 1
)
  
[2025-02-26 23:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:08:06' and `end` < '2025-02-26 23:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:08:18] Production.INFO: count ==1167  
[2025-02-26 23:08:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:08:06 - End Time 2025-02-26 23:08:06  
[2025-02-26 23:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565030', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565030', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565030', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565030', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:08:18] Production.INFO: ProcessCDR(1,14565030,1,1,2)  
[2025-02-26 23:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565030', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565030', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:08:21] Production.INFO: ==22095== Releasing lock...  
[2025-02-26 23:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:08:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:09:05
    [end_date_ymd] => 2025-02-26 23:09:05
    [RateCDR] => 1
)
  
[2025-02-26 23:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:09:05' and `end` < '2025-02-26 23:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:09:17] Production.INFO: count ==1167  
[2025-02-26 23:09:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:09:05 - End Time 2025-02-26 23:09:05  
[2025-02-26 23:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565035', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565035', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565035', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565035', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:09:17] Production.INFO: ProcessCDR(1,14565035,1,1,2)  
[2025-02-26 23:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565035', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565035', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:09:20] Production.INFO: ==22164== Releasing lock...  
[2025-02-26 23:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:09:20] Production.INFO: 37.25 MB  #Memory Used#   
[2025-02-26 23:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:10:06
    [end_date_ymd] => 2025-02-26 23:10:06
    [RateCDR] => 1
)
  
[2025-02-26 23:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:10:06' and `end` < '2025-02-26 23:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:10:18] Production.INFO: count ==1165  
[2025-02-26 23:10:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:10:06 - End Time 2025-02-26 23:10:06  
[2025-02-26 23:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565040', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565040', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565040', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565040', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:10:18] Production.INFO: ProcessCDR(1,14565040,1,1,2)  
[2025-02-26 23:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565040', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565040', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:10:21] Production.INFO: ==22280== Releasing lock...  
[2025-02-26 23:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:10:21] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 23:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:11:05
    [end_date_ymd] => 2025-02-26 23:11:05
    [RateCDR] => 1
)
  
[2025-02-26 23:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:11:05' and `end` < '2025-02-26 23:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:11:17] Production.INFO: count ==1122  
[2025-02-26 23:11:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:11:05 - End Time 2025-02-26 23:11:05  
[2025-02-26 23:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565046', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565046', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565046', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565046', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:11:17] Production.INFO: ProcessCDR(1,14565046,1,1,2)  
[2025-02-26 23:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565046', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565046', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:11:20] Production.INFO: ==22356== Releasing lock...  
[2025-02-26 23:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:11:20] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 23:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:12:06
    [end_date_ymd] => 2025-02-26 23:12:06
    [RateCDR] => 1
)
  
[2025-02-26 23:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:12:06' and `end` < '2025-02-26 23:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:12:18] Production.INFO: count ==1119  
[2025-02-26 23:12:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:12:06 - End Time 2025-02-26 23:12:06  
[2025-02-26 23:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565051', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565051', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565051', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565051', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:12:18] Production.INFO: ProcessCDR(1,14565051,1,1,2)  
[2025-02-26 23:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:12:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:12:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:12:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565051', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565051', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:12:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:12:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:12:22] Production.INFO: ==22508== Releasing lock...  
[2025-02-26 23:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:12:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 23:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:13:05
    [end_date_ymd] => 2025-02-26 23:13:05
    [RateCDR] => 1
)
  
[2025-02-26 23:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:13:05' and `end` < '2025-02-26 23:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:13:17] Production.INFO: count ==1118  
[2025-02-26 23:13:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:13:05 - End Time 2025-02-26 23:13:05  
[2025-02-26 23:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565056', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565056', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565056', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565056', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:13:17] Production.INFO: ProcessCDR(1,14565056,1,1,2)  
[2025-02-26 23:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565056', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565056', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:13:20] Production.INFO: ==22577== Releasing lock...  
[2025-02-26 23:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:13:20] Production.INFO: 37 MB  #Memory Used#   
[2025-02-26 23:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:14:06
    [end_date_ymd] => 2025-02-26 23:14:06
    [RateCDR] => 1
)
  
[2025-02-26 23:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:14:06' and `end` < '2025-02-26 23:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:14:18] Production.INFO: count ==1119  
[2025-02-26 23:14:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:14:06 - End Time 2025-02-26 23:14:06  
[2025-02-26 23:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565061', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565061', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:14:18] Production.INFO: ProcessCDR(1,14565061,1,1,2)  
[2025-02-26 23:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565061', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565061', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:14:21] Production.INFO: ==22655== Releasing lock...  
[2025-02-26 23:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:14:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 23:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:15:06
    [end_date_ymd] => 2025-02-26 23:15:06
    [RateCDR] => 1
)
  
[2025-02-26 23:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:15:06' and `end` < '2025-02-26 23:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:15:18] Production.INFO: count ==1116  
[2025-02-26 23:15:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:15:06 - End Time 2025-02-26 23:15:06  
[2025-02-26 23:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565066', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565066', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565066', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565066', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:15:18] Production.INFO: ProcessCDR(1,14565066,1,1,2)  
[2025-02-26 23:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565066', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565066', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:15:21] Production.INFO: ==22815== Releasing lock...  
[2025-02-26 23:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:15:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 23:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:16:05
    [end_date_ymd] => 2025-02-26 23:16:05
    [RateCDR] => 1
)
  
[2025-02-26 23:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:16:05' and `end` < '2025-02-26 23:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:16:17] Production.INFO: count ==1108  
[2025-02-26 23:16:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:16:05 - End Time 2025-02-26 23:16:05  
[2025-02-26 23:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565071', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565071', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565071', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565071', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:16:18] Production.INFO: ProcessCDR(1,14565071,1,1,2)  
[2025-02-26 23:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565071', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565071', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:16:21] Production.INFO: ==22887== Releasing lock...  
[2025-02-26 23:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:16:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-02-26 23:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:17:05
    [end_date_ymd] => 2025-02-26 23:17:05
    [RateCDR] => 1
)
  
[2025-02-26 23:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:17:05' and `end` < '2025-02-26 23:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:17:17] Production.INFO: count ==1104  
[2025-02-26 23:17:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:17:05 - End Time 2025-02-26 23:17:05  
[2025-02-26 23:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565076', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565076', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565076', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565076', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:17:18] Production.INFO: ProcessCDR(1,14565076,1,1,2)  
[2025-02-26 23:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565076', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565076', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:17:21] Production.INFO: ==22957== Releasing lock...  
[2025-02-26 23:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:17:21] Production.INFO: 36.5 MB  #Memory Used#   
[2025-02-26 23:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:18:05
    [end_date_ymd] => 2025-02-26 23:18:05
    [RateCDR] => 1
)
  
[2025-02-26 23:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:18:05' and `end` < '2025-02-26 23:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:18:17] Production.INFO: count ==1100  
[2025-02-26 23:18:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:18:05 - End Time 2025-02-26 23:18:05  
[2025-02-26 23:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565081', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565081', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565081', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565081', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:18:17] Production.INFO: ProcessCDR(1,14565081,1,1,2)  
[2025-02-26 23:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565081', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565081', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:18:21] Production.INFO: ==23031== Releasing lock...  
[2025-02-26 23:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:18:21] Production.INFO: 36.25 MB  #Memory Used#   
[2025-02-26 23:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:19:05
    [end_date_ymd] => 2025-02-26 23:19:05
    [RateCDR] => 1
)
  
[2025-02-26 23:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:19:05' and `end` < '2025-02-26 23:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:19:17] Production.INFO: count ==1088  
[2025-02-26 23:19:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:19:05 - End Time 2025-02-26 23:19:05  
[2025-02-26 23:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565086', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565086', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565086', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565086', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:19:17] Production.INFO: ProcessCDR(1,14565086,1,1,2)  
[2025-02-26 23:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565086', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565086', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:19:21] Production.INFO: ==23104== Releasing lock...  
[2025-02-26 23:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:19:21] Production.INFO: 36.5 MB  #Memory Used#   
[2025-02-26 23:20:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:20:05
    [end_date_ymd] => 2025-02-26 23:20:05
    [RateCDR] => 1
)
  
[2025-02-26 23:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:20:05' and `end` < '2025-02-26 23:20:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:20:17] Production.INFO: count ==1076  
[2025-02-26 23:20:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:20:05 - End Time 2025-02-26 23:20:05  
[2025-02-26 23:20:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:20:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565091', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565091', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565091', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565091', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:20:18] Production.INFO: ProcessCDR(1,14565091,1,1,2)  
[2025-02-26 23:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:20:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:20:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565091', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565091', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:20:21] Production.INFO: ==23179== Releasing lock...  
[2025-02-26 23:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:20:21] Production.INFO: 36.25 MB  #Memory Used#   
[2025-02-26 23:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:21:05
    [end_date_ymd] => 2025-02-26 23:21:05
    [RateCDR] => 1
)
  
[2025-02-26 23:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:21:05' and `end` < '2025-02-26 23:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:21:17] Production.INFO: count ==1034  
[2025-02-26 23:21:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:21:05 - End Time 2025-02-26 23:21:05  
[2025-02-26 23:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565097', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565097', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565097', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565097', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:21:17] Production.INFO: ProcessCDR(1,14565097,1,1,2)  
[2025-02-26 23:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565097', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565097', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:21:21] Production.INFO: ==23252== Releasing lock...  
[2025-02-26 23:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:21:21] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:22:05
    [end_date_ymd] => 2025-02-26 23:22:05
    [RateCDR] => 1
)
  
[2025-02-26 23:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:22:05' and `end` < '2025-02-26 23:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:22:17] Production.INFO: count ==1029  
[2025-02-26 23:22:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:22:05 - End Time 2025-02-26 23:22:05  
[2025-02-26 23:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565102', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565102', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565102', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565102', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:22:17] Production.INFO: ProcessCDR(1,14565102,1,1,2)  
[2025-02-26 23:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565102', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565102', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:22:20] Production.INFO: ==23325== Releasing lock...  
[2025-02-26 23:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:22:20] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:23:05
    [end_date_ymd] => 2025-02-26 23:23:05
    [RateCDR] => 1
)
  
[2025-02-26 23:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:23:05' and `end` < '2025-02-26 23:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:23:17] Production.INFO: count ==1029  
[2025-02-26 23:23:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:23:05 - End Time 2025-02-26 23:23:05  
[2025-02-26 23:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565107', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565107', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565107', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565107', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:23:18] Production.INFO: ProcessCDR(1,14565107,1,1,2)  
[2025-02-26 23:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565107', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565107', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:23:21] Production.INFO: ==23439== Releasing lock...  
[2025-02-26 23:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:23:21] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:24:05
    [end_date_ymd] => 2025-02-26 23:24:05
    [RateCDR] => 1
)
  
[2025-02-26 23:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:24:05' and `end` < '2025-02-26 23:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:24:17] Production.INFO: count ==1026  
[2025-02-26 23:24:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:24:05 - End Time 2025-02-26 23:24:05  
[2025-02-26 23:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565109', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565109', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:24:17] Production.INFO: ProcessCDR(1,14565109,1,1,2)  
[2025-02-26 23:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565109', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565109', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:24:21] Production.INFO: ==23556== Releasing lock...  
[2025-02-26 23:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:24:21] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:25:05
    [end_date_ymd] => 2025-02-26 23:25:05
    [RateCDR] => 1
)
  
[2025-02-26 23:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:25:05' and `end` < '2025-02-26 23:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:25:17] Production.INFO: count ==1021  
[2025-02-26 23:25:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:25:05 - End Time 2025-02-26 23:25:05  
[2025-02-26 23:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565117', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565117', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565117', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565117', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:25:17] Production.INFO: ProcessCDR(1,14565117,1,1,2)  
[2025-02-26 23:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:25:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:25:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:25:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:25:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565117', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:25:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565117', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:25:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:25:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:25:22] Production.INFO: ==23672== Releasing lock...  
[2025-02-26 23:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:25:22] Production.INFO: 36.25 MB  #Memory Used#   
[2025-02-26 23:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:26:05
    [end_date_ymd] => 2025-02-26 23:26:05
    [RateCDR] => 1
)
  
[2025-02-26 23:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:26:05' and `end` < '2025-02-26 23:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:26:17] Production.INFO: count ==1013  
[2025-02-26 23:26:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:26:05 - End Time 2025-02-26 23:26:05  
[2025-02-26 23:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565122', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565122', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565122', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565122', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:26:18] Production.INFO: ProcessCDR(1,14565122,1,1,2)  
[2025-02-26 23:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565122', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565122', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:26:21] Production.INFO: ==23829== Releasing lock...  
[2025-02-26 23:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:26:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 23:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:27:05
    [end_date_ymd] => 2025-02-26 23:27:05
    [RateCDR] => 1
)
  
[2025-02-26 23:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:27:05' and `end` < '2025-02-26 23:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:27:17] Production.INFO: count ==1015  
[2025-02-26 23:27:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:27:05 - End Time 2025-02-26 23:27:05  
[2025-02-26 23:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565126', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565126', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565126', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565126', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:27:17] Production.INFO: ProcessCDR(1,14565126,1,1,2)  
[2025-02-26 23:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565126', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565126', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:27:20] Production.INFO: ==23953== Releasing lock...  
[2025-02-26 23:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:27:20] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:28:05
    [end_date_ymd] => 2025-02-26 23:28:05
    [RateCDR] => 1
)
  
[2025-02-26 23:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:28:05' and `end` < '2025-02-26 23:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:28:17] Production.INFO: count ==1015  
[2025-02-26 23:28:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:28:05 - End Time 2025-02-26 23:28:05  
[2025-02-26 23:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565132', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565132', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565132', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565132', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:28:18] Production.INFO: ProcessCDR(1,14565132,1,1,2)  
[2025-02-26 23:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565132', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565132', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:28:22] Production.INFO: ==24071== Releasing lock...  
[2025-02-26 23:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:28:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:29:05
    [end_date_ymd] => 2025-02-26 23:29:05
    [RateCDR] => 1
)
  
[2025-02-26 23:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:29:05' and `end` < '2025-02-26 23:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:29:17] Production.INFO: count ==1015  
[2025-02-26 23:29:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:29:05 - End Time 2025-02-26 23:29:05  
[2025-02-26 23:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565137', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565137', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565137', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565137', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:29:17] Production.INFO: ProcessCDR(1,14565137,1,1,2)  
[2025-02-26 23:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565137', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565137', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:29:20] Production.INFO: ==24187== Releasing lock...  
[2025-02-26 23:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:29:20] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:30:06
    [end_date_ymd] => 2025-02-26 23:30:06
    [RateCDR] => 1
)
  
[2025-02-26 23:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:30:06' and `end` < '2025-02-26 23:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:30:18] Production.INFO: count ==1015  
[2025-02-26 23:30:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:30:06 - End Time 2025-02-26 23:30:06  
[2025-02-26 23:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565143', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565143', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565143', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565143', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:30:18] Production.INFO: ProcessCDR(1,14565143,1,1,2)  
[2025-02-26 23:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565143', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565143', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:30:22] Production.INFO: ==24310== Releasing lock...  
[2025-02-26 23:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:30:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:31:05
    [end_date_ymd] => 2025-02-26 23:31:05
    [RateCDR] => 1
)
  
[2025-02-26 23:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:31:05' and `end` < '2025-02-26 23:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:31:17] Production.INFO: count ==987  
[2025-02-26 23:31:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:31:05 - End Time 2025-02-26 23:31:05  
[2025-02-26 23:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565148', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565148', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565148', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565148', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:31:18] Production.INFO: ProcessCDR(1,14565148,1,1,2)  
[2025-02-26 23:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565148', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565148', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:31:21] Production.INFO: ==24431== Releasing lock...  
[2025-02-26 23:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:31:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 23:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:32:06
    [end_date_ymd] => 2025-02-26 23:32:06
    [RateCDR] => 1
)
  
[2025-02-26 23:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:32:06' and `end` < '2025-02-26 23:32:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:32:18] Production.INFO: count ==991  
[2025-02-26 23:32:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:32:06 - End Time 2025-02-26 23:32:06  
[2025-02-26 23:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565153', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565153', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565153', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565153', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:32:18] Production.INFO: ProcessCDR(1,14565153,1,1,2)  
[2025-02-26 23:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565153', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565153', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:32:21] Production.INFO: ==24548== Releasing lock...  
[2025-02-26 23:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:32:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 23:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:33:05
    [end_date_ymd] => 2025-02-26 23:33:05
    [RateCDR] => 1
)
  
[2025-02-26 23:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:33:05' and `end` < '2025-02-26 23:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:33:17] Production.INFO: count ==983  
[2025-02-26 23:33:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:33:05 - End Time 2025-02-26 23:33:05  
[2025-02-26 23:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565158', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565158', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565158', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565158', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:33:17] Production.INFO: ProcessCDR(1,14565158,1,1,2)  
[2025-02-26 23:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565158', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565158', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:33:20] Production.INFO: ==24663== Releasing lock...  
[2025-02-26 23:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:33:20] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 23:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:34:06
    [end_date_ymd] => 2025-02-26 23:34:06
    [RateCDR] => 1
)
  
[2025-02-26 23:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:34:06' and `end` < '2025-02-26 23:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:34:18] Production.INFO: count ==984  
[2025-02-26 23:34:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:34:06 - End Time 2025-02-26 23:34:06  
[2025-02-26 23:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565163', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565163', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565163', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565163', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:34:18] Production.INFO: ProcessCDR(1,14565163,1,1,2)  
[2025-02-26 23:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565163', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565163', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:34:21] Production.INFO: ==24800== Releasing lock...  
[2025-02-26 23:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:34:21] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:35:04
    [end_date_ymd] => 2025-02-26 23:35:04
    [RateCDR] => 1
)
  
[2025-02-26 23:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:35:04' and `end` < '2025-02-26 23:35:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:35:17] Production.INFO: count ==986  
[2025-02-26 23:35:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:35:04 - End Time 2025-02-26 23:35:04  
[2025-02-26 23:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565168', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565168', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565168', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565168', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:35:17] Production.INFO: ProcessCDR(1,14565168,1,1,2)  
[2025-02-26 23:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565168', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565168', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:35:20] Production.INFO: ==24958== Releasing lock...  
[2025-02-26 23:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:35:20] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 23:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:36:05
    [end_date_ymd] => 2025-02-26 23:36:05
    [RateCDR] => 1
)
  
[2025-02-26 23:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:36:05' and `end` < '2025-02-26 23:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:36:17] Production.INFO: count ==982  
[2025-02-26 23:36:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:36:05 - End Time 2025-02-26 23:36:05  
[2025-02-26 23:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565173', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565173', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565173', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565173', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:36:18] Production.INFO: ProcessCDR(1,14565173,1,1,2)  
[2025-02-26 23:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565173', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565173', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:36:21] Production.INFO: ==25096== Releasing lock...  
[2025-02-26 23:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:36:21] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:37:05
    [end_date_ymd] => 2025-02-26 23:37:05
    [RateCDR] => 1
)
  
[2025-02-26 23:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:37:05' and `end` < '2025-02-26 23:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:37:17] Production.INFO: count ==978  
[2025-02-26 23:37:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:37:05 - End Time 2025-02-26 23:37:05  
[2025-02-26 23:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565178', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565178', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565178', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565178', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:37:17] Production.INFO: ProcessCDR(1,14565178,1,1,2)  
[2025-02-26 23:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565178', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565178', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:37:20] Production.INFO: ==25213== Releasing lock...  
[2025-02-26 23:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:37:20] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:38:05
    [end_date_ymd] => 2025-02-26 23:38:05
    [RateCDR] => 1
)
  
[2025-02-26 23:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:38:05' and `end` < '2025-02-26 23:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:38:17] Production.INFO: count ==968  
[2025-02-26 23:38:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:38:05 - End Time 2025-02-26 23:38:05  
[2025-02-26 23:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565183', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565183', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565183', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565183', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:38:17] Production.INFO: ProcessCDR(1,14565183,1,1,2)  
[2025-02-26 23:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565183', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565183', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:38:20] Production.INFO: ==25335== Releasing lock...  
[2025-02-26 23:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:38:20] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 23:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:39:05
    [end_date_ymd] => 2025-02-26 23:39:05
    [RateCDR] => 1
)
  
[2025-02-26 23:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:39:05' and `end` < '2025-02-26 23:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:39:17] Production.INFO: count ==962  
[2025-02-26 23:39:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:39:05 - End Time 2025-02-26 23:39:05  
[2025-02-26 23:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565188', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565188', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565188', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565188', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:39:17] Production.INFO: ProcessCDR(1,14565188,1,1,2)  
[2025-02-26 23:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565188', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565188', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:39:20] Production.INFO: ==25451== Releasing lock...  
[2025-02-26 23:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:39:20] Production.INFO: 35.75 MB  #Memory Used#   
[2025-02-26 23:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:40:06
    [end_date_ymd] => 2025-02-26 23:40:06
    [RateCDR] => 1
)
  
[2025-02-26 23:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:40:06' and `end` < '2025-02-26 23:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:40:18] Production.INFO: count ==954  
[2025-02-26 23:40:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:40:06 - End Time 2025-02-26 23:40:06  
[2025-02-26 23:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565193', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565193', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565193', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565193', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:40:18] Production.INFO: ProcessCDR(1,14565193,1,1,2)  
[2025-02-26 23:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565193', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565193', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:40:21] Production.INFO: ==25565== Releasing lock...  
[2025-02-26 23:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:40:21] Production.INFO: 35.25 MB  #Memory Used#   
[2025-02-26 23:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:41:06
    [end_date_ymd] => 2025-02-26 23:41:06
    [RateCDR] => 1
)
  
[2025-02-26 23:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:41:06' and `end` < '2025-02-26 23:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:41:18] Production.INFO: count ==952  
[2025-02-26 23:41:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:41:06 - End Time 2025-02-26 23:41:06  
[2025-02-26 23:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565199', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565199', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565199', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565199', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:41:18] Production.INFO: ProcessCDR(1,14565199,1,1,2)  
[2025-02-26 23:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565199', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565199', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:41:21] Production.INFO: ==25707== Releasing lock...  
[2025-02-26 23:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:41:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 23:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:42:05
    [end_date_ymd] => 2025-02-26 23:42:05
    [RateCDR] => 1
)
  
[2025-02-26 23:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:42:05' and `end` < '2025-02-26 23:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:42:17] Production.INFO: count ==945  
[2025-02-26 23:42:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:42:05 - End Time 2025-02-26 23:42:05  
[2025-02-26 23:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565204', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565204', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565204', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565204', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:42:17] Production.INFO: ProcessCDR(1,14565204,1,1,2)  
[2025-02-26 23:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565204', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565204', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:42:22] Production.INFO: ==25783== Releasing lock...  
[2025-02-26 23:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:42:22] Production.INFO: 36 MB  #Memory Used#   
[2025-02-26 23:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:43:05
    [end_date_ymd] => 2025-02-26 23:43:05
    [RateCDR] => 1
)
  
[2025-02-26 23:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:43:05' and `end` < '2025-02-26 23:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:43:17] Production.INFO: count ==944  
[2025-02-26 23:43:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:43:05 - End Time 2025-02-26 23:43:05  
[2025-02-26 23:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565209', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565209', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565209', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565209', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:43:17] Production.INFO: ProcessCDR(1,14565209,1,1,2)  
[2025-02-26 23:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565209', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565209', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:43:21] Production.INFO: ==25853== Releasing lock...  
[2025-02-26 23:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:43:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-02-26 23:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:44:05
    [end_date_ymd] => 2025-02-26 23:44:05
    [RateCDR] => 1
)
  
[2025-02-26 23:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:44:05' and `end` < '2025-02-26 23:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:44:17] Production.INFO: count ==928  
[2025-02-26 23:44:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:44:05 - End Time 2025-02-26 23:44:05  
[2025-02-26 23:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565214', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565214', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565214', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565214', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:44:17] Production.INFO: ProcessCDR(1,14565214,1,1,2)  
[2025-02-26 23:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565214', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565214', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:44:20] Production.INFO: ==25924== Releasing lock...  
[2025-02-26 23:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:44:20] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 23:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:45:05
    [end_date_ymd] => 2025-02-26 23:45:05
    [RateCDR] => 1
)
  
[2025-02-26 23:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:45:05' and `end` < '2025-02-26 23:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:45:17] Production.INFO: count ==918  
[2025-02-26 23:45:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:45:05 - End Time 2025-02-26 23:45:05  
[2025-02-26 23:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565219', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565219', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565219', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565219', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:45:18] Production.INFO: ProcessCDR(1,14565219,1,1,2)  
[2025-02-26 23:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:45:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:45:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:45:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565219', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565219', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:45:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:45:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:45:22] Production.INFO: ==25997== Releasing lock...  
[2025-02-26 23:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:45:22] Production.INFO: 34.5 MB  #Memory Used#   
[2025-02-26 23:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:46:05
    [end_date_ymd] => 2025-02-26 23:46:05
    [RateCDR] => 1
)
  
[2025-02-26 23:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:46:05' and `end` < '2025-02-26 23:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:46:16] Production.INFO: count ==905  
[2025-02-26 23:46:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:46:05 - End Time 2025-02-26 23:46:05  
[2025-02-26 23:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565224', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565224', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565224', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565224', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:46:17] Production.INFO: ProcessCDR(1,14565224,1,1,2)  
[2025-02-26 23:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565224', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565224', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:46:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:46:20] Production.INFO: ==26066== Releasing lock...  
[2025-02-26 23:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:46:20] Production.INFO: 34.5 MB  #Memory Used#   
[2025-02-26 23:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:47:05
    [end_date_ymd] => 2025-02-26 23:47:05
    [RateCDR] => 1
)
  
[2025-02-26 23:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:47:05' and `end` < '2025-02-26 23:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:47:17] Production.INFO: count ==892  
[2025-02-26 23:47:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:47:05 - End Time 2025-02-26 23:47:05  
[2025-02-26 23:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565229', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565229', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565229', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565229', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:47:17] Production.INFO: ProcessCDR(1,14565229,1,1,2)  
[2025-02-26 23:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565229', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565229', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:47:20] Production.INFO: ==26138== Releasing lock...  
[2025-02-26 23:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:47:20] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 23:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:48:05
    [end_date_ymd] => 2025-02-26 23:48:05
    [RateCDR] => 1
)
  
[2025-02-26 23:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:48:05' and `end` < '2025-02-26 23:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:48:17] Production.INFO: count ==880  
[2025-02-26 23:48:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:48:05 - End Time 2025-02-26 23:48:05  
[2025-02-26 23:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565234', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565234', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565234', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565234', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:48:17] Production.INFO: ProcessCDR(1,14565234,1,1,2)  
[2025-02-26 23:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565234', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565234', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:48:20] Production.INFO: ==26209== Releasing lock...  
[2025-02-26 23:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:48:20] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 23:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:49:05
    [end_date_ymd] => 2025-02-26 23:49:05
    [RateCDR] => 1
)
  
[2025-02-26 23:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:49:05' and `end` < '2025-02-26 23:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:49:17] Production.INFO: count ==865  
[2025-02-26 23:49:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:49:05 - End Time 2025-02-26 23:49:05  
[2025-02-26 23:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565239', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565239', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565239', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565239', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:49:17] Production.INFO: ProcessCDR(1,14565239,1,1,2)  
[2025-02-26 23:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565239', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565239', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:49:20] Production.INFO: ==26281== Releasing lock...  
[2025-02-26 23:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:49:20] Production.INFO: 34.25 MB  #Memory Used#   
[2025-02-26 23:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:50:06
    [end_date_ymd] => 2025-02-26 23:50:06
    [RateCDR] => 1
)
  
[2025-02-26 23:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:50:06' and `end` < '2025-02-26 23:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:50:18] Production.INFO: count ==849  
[2025-02-26 23:50:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:50:06 - End Time 2025-02-26 23:50:06  
[2025-02-26 23:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565245', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565245', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565245', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565245', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:50:18] Production.INFO: ProcessCDR(1,14565245,1,1,2)  
[2025-02-26 23:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565245', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565245', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:50:21] Production.INFO: ==26354== Releasing lock...  
[2025-02-26 23:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:50:21] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 23:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:51:05
    [end_date_ymd] => 2025-02-26 23:51:05
    [RateCDR] => 1
)
  
[2025-02-26 23:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:51:05' and `end` < '2025-02-26 23:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:51:17] Production.INFO: count ==823  
[2025-02-26 23:51:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:51:05 - End Time 2025-02-26 23:51:05  
[2025-02-26 23:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565250', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565250', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565250', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565250', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:51:17] Production.INFO: ProcessCDR(1,14565250,1,1,2)  
[2025-02-26 23:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:51:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565250', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:51:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565250', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:51:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:51:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:51:20] Production.INFO: ==26425== Releasing lock...  
[2025-02-26 23:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:51:20] Production.INFO: 34 MB  #Memory Used#   
[2025-02-26 23:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:52:05
    [end_date_ymd] => 2025-02-26 23:52:05
    [RateCDR] => 1
)
  
[2025-02-26 23:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:52:05' and `end` < '2025-02-26 23:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:52:17] Production.INFO: count ==808  
[2025-02-26 23:52:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:52:05 - End Time 2025-02-26 23:52:05  
[2025-02-26 23:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565255', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565255', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565255', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565255', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:52:17] Production.INFO: ProcessCDR(1,14565255,1,1,2)  
[2025-02-26 23:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565255', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565255', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:52:21] Production.INFO: ==26496== Releasing lock...  
[2025-02-26 23:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:52:21] Production.INFO: 33.5 MB  #Memory Used#   
[2025-02-26 23:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:53:06
    [end_date_ymd] => 2025-02-26 23:53:06
    [RateCDR] => 1
)
  
[2025-02-26 23:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:53:06' and `end` < '2025-02-26 23:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:53:18] Production.INFO: count ==794  
[2025-02-26 23:53:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:53:06 - End Time 2025-02-26 23:53:06  
[2025-02-26 23:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565260', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565260', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565260', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565260', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:53:18] Production.INFO: ProcessCDR(1,14565260,1,1,2)  
[2025-02-26 23:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565260', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565260', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:53:21] Production.INFO: ==26572== Releasing lock...  
[2025-02-26 23:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:53:21] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 23:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:54:06
    [end_date_ymd] => 2025-02-26 23:54:06
    [RateCDR] => 1
)
  
[2025-02-26 23:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:54:06' and `end` < '2025-02-26 23:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:54:18] Production.INFO: count ==781  
[2025-02-26 23:54:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:54:06 - End Time 2025-02-26 23:54:06  
[2025-02-26 23:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565265', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565265', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565265', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565265', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:54:18] Production.INFO: ProcessCDR(1,14565265,1,1,2)  
[2025-02-26 23:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565265', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565265', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:54:21] Production.INFO: ==26644== Releasing lock...  
[2025-02-26 23:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:54:21] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 23:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:55:05
    [end_date_ymd] => 2025-02-26 23:55:05
    [RateCDR] => 1
)
  
[2025-02-26 23:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:55:05' and `end` < '2025-02-26 23:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:55:17] Production.INFO: count ==769  
[2025-02-26 23:55:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:55:05 - End Time 2025-02-26 23:55:05  
[2025-02-26 23:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565270', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565270', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565270', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565270', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:55:17] Production.INFO: ProcessCDR(1,14565270,1,1,2)  
[2025-02-26 23:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565270', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565270', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:55:21] Production.INFO: ==26716== Releasing lock...  
[2025-02-26 23:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:55:21] Production.INFO: 33.25 MB  #Memory Used#   
[2025-02-26 23:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:56:05
    [end_date_ymd] => 2025-02-26 23:56:05
    [RateCDR] => 1
)
  
[2025-02-26 23:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:56:05' and `end` < '2025-02-26 23:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:56:17] Production.INFO: count ==754  
[2025-02-26 23:56:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:56:05 - End Time 2025-02-26 23:56:05  
[2025-02-26 23:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565275', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565275', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565275', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565275', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:56:17] Production.INFO: ProcessCDR(1,14565275,1,1,2)  
[2025-02-26 23:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:56:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565275', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:56:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565275', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:56:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:56:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:56:20] Production.INFO: ==26789== Releasing lock...  
[2025-02-26 23:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:56:20] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 23:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:57:06
    [end_date_ymd] => 2025-02-26 23:57:06
    [RateCDR] => 1
)
  
[2025-02-26 23:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:57:06' and `end` < '2025-02-26 23:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:57:18] Production.INFO: count ==749  
[2025-02-26 23:57:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:57:06 - End Time 2025-02-26 23:57:06  
[2025-02-26 23:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565280', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565280', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565280', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565280', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:57:18] Production.INFO: ProcessCDR(1,14565280,1,1,2)  
[2025-02-26 23:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565280', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565280', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:57:22] Production.INFO: ==26902== Releasing lock...  
[2025-02-26 23:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:57:22] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 23:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:58:06
    [end_date_ymd] => 2025-02-26 23:58:06
    [RateCDR] => 1
)
  
[2025-02-26 23:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:58:06' and `end` < '2025-02-26 23:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:58:18] Production.INFO: count ==750  
[2025-02-26 23:58:18] Production.ERROR: pbx CDR StartTime 2025-02-26 20:58:06 - End Time 2025-02-26 23:58:06  
[2025-02-26 23:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565285', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565285', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565285', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565285', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:58:18] Production.INFO: ProcessCDR(1,14565285,1,1,2)  
[2025-02-26 23:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:58:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565285', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565285', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:58:23] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:58:23] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:58:23] Production.INFO: ==26974== Releasing lock...  
[2025-02-26 23:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:58:23] Production.INFO: 33 MB  #Memory Used#   
[2025-02-26 23:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-02-26 20:59:05
    [end_date_ymd] => 2025-02-26 23:59:05
    [RateCDR] => 1
)
  
[2025-02-26 23:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-02-26 20:59:05' and `end` < '2025-02-26 23:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-02-26 23:59:17] Production.INFO: count ==754  
[2025-02-26 23:59:17] Production.ERROR: pbx CDR StartTime 2025-02-26 20:59:05 - End Time 2025-02-26 23:59:05  
[2025-02-26 23:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-02-26 23:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565290', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14565290', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565290', 'tblTempVendorCDR_20' ) start  
[2025-02-26 23:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14565290', 'tblTempVendorCDR_20' ) end  
[2025-02-26 23:59:17] Production.INFO: ProcessCDR(1,14565290,1,1,2)  
[2025-02-26 23:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14565290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14565290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-02-26 23:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14565290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14565290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-02-26 23:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565290', 'tblTempUsageDetail_20' ) start  
[2025-02-26 23:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14565290', 'tblTempUsageDetail_20' ) end  
[2025-02-26 23:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-02-26 23:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-02-26 23:59:20] Production.INFO: ==27043== Releasing lock...  
[2025-02-26 23:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-02-26 23:59:20] Production.INFO: 33 MB  #Memory Used#